mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Laine Gholson <laine.gholson@gmail.com>
To: musl@lists.openwall.com
Subject: [PATCH] bind_textdomain_codeset: don't return failure unless encoding isn't UTF-8
Date: Sat, 3 Dec 2016 21:04:42 -0600	[thread overview]
Message-ID: <0b0335bc-f4da-b345-bf19-aabce9a0be93@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 67 bytes --]

returning null broke a vlc media player built with gettext support

[-- Attachment #2: bind_textdomain_codeset.patch --]
[-- Type: text/x-patch, Size: 939 bytes --]

From 2f79aa294db5d9230ad71298e3de4b5561b441be Mon Sep 17 00:00:00 2001
From: Laine Gholson <laine.gholson@gmail.com>
Date: Wed, 9 Nov 2016 20:19:00 -0600
Subject: [PATCH] bind_textdomain_codeset: don't return failure unless encoding isn't UTF-8

VLC isn't happy when bind_textdomain_codeset returns NULL
---
 src/locale/bind_textdomain_codeset.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/locale/bind_textdomain_codeset.c b/src/locale/bind_textdomain_codeset.c
index 5ebfd5e..e5f3f52 100644
--- a/src/locale/bind_textdomain_codeset.c
+++ b/src/locale/bind_textdomain_codeset.c
@@ -5,7 +5,9 @@
 
 char *bind_textdomain_codeset(const char *domainname, const char *codeset)
 {
-	if (codeset && strcasecmp(codeset, "UTF-8"))
+	if (codeset && ((strcasecmp(codeset, "UTF-8") == 0) || (strcasecmp(codeset, "UTF8") == 0))) {
+		return "UTF-8";
+	} else if (codeset)
 		errno = EINVAL;
 	return NULL;
 }
-- 
2.10.2


             reply	other threads:[~2016-12-04  3:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-04  3:04 Laine Gholson [this message]
2016-12-17  3:59 ` Rich Felker
2016-12-30  3:14   ` Rich Felker
2016-12-30 22:13     ` Laine Gholson
2016-12-30 22:22       ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b0335bc-f4da-b345-bf19-aabce9a0be93@gmail.com \
    --to=laine.gholson@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).