mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] bind_textdomain_codeset: don't return failure unless encoding isn't UTF-8
@ 2016-12-04  3:04 Laine Gholson
  2016-12-17  3:59 ` Rich Felker
  0 siblings, 1 reply; 5+ messages in thread
From: Laine Gholson @ 2016-12-04  3:04 UTC (permalink / raw)
  To: musl

[-- 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-30 22:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-04  3:04 [PATCH] bind_textdomain_codeset: don't return failure unless encoding isn't UTF-8 Laine Gholson
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

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).