From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10763 Path: news.gmane.org!.POSTED!not-for-mail From: Laine Gholson Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] bind_textdomain_codeset: don't return failure unless encoding isn't UTF-8 Date: Sat, 3 Dec 2016 21:04:42 -0600 Message-ID: <0b0335bc-f4da-b345-bf19-aabce9a0be93@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------B99525DD670534556A39FED7" X-Trace: blaine.gmane.org 1480820707 29845 195.159.176.226 (4 Dec 2016 03:05:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Dec 2016 03:05:07 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux armv7l; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: musl@lists.openwall.com Original-X-From: musl-return-10776-gllmg-musl=m.gmane.org@lists.openwall.com Sun Dec 04 04:05:03 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cDN6q-0007Ar-VC for gllmg-musl@m.gmane.org; Sun, 04 Dec 2016 04:05:01 +0100 Original-Received: (qmail 24307 invoked by uid 550); 4 Dec 2016 03:05:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24281 invoked from network); 4 Dec 2016 03:04:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version; bh=u94GCNiUChhs/KtrETXSu2+tg5wcv6SwLIe/vRFLVqg=; b=sjOWICBqGt80H/s+MvYFodKmM15Vr+J+tyH7zNQEjLy/BkAUJkLXkB2bU9tGLvJ2ep D829JZg102syR9rGNt+6poqlLhfQobPNI6U7SfxFXhSKnYzIcVuqbBpTfieiNa3Zvt5k AoboWofPFtfd5i26aq+qun8H9NBXiTmROf1YXR/5Qc3NRbgt6FdZ33TeOH7kkdU6/6yQ na1IcGtm1ezPj2BJy+jr64nnn6NwO5PD1Mxx6JjxTHtCTjO9HNTzabksEZUhDNCk8v8c XiR6XQUuyhck3uTv8jVzSOsHoHMkNE2wgJ8ljvlgmPdjhhLCJrqJI4txQQeLDJ800lK5 HT4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=u94GCNiUChhs/KtrETXSu2+tg5wcv6SwLIe/vRFLVqg=; b=GS2xcg1aFgqZZRkuSMKxXuqqdgeV3NjgVOBBrHEOaXTSv51sn0m3THCOoLOqa2oAJM AMy+lZsbL5wwpSKXYbBJO0R/z9P0QESzxhAl3+yhUZL9NgHV1AtDMX6ojL8iSYNWXyyO uTKBM2CtJkuVALvmCByOydTw9lPueTJQri88dfcNmH8wLFFijySgKHmKXCLk+m/Xa952 IVr6MNPwueqlcGx4R6REYDBW5E2N0u+twTVv97GY4H0xnc8ONoT/UHHXpCkN6MaFGQwu NDfRy5nhMaCgc/NXoFUy+r66xlUtdAth2Ag3rrB+50hOpgHYu0ET6CuVhLQp/RbIa71Z /O3A== X-Gm-Message-State: AKaTC02SGSK6tp/z/28DsuW+BaZsOAVglK5vKPQVRENef4Ro0Pnm+cPhB01f2mi/GK6IeQ== X-Received: by 10.36.121.145 with SMTP id z139mr3487231itc.87.1480820687771; Sat, 03 Dec 2016 19:04:47 -0800 (PST) Xref: news.gmane.org gmane.linux.lib.musl.general:10763 Archived-At: This is a multi-part message in MIME format. --------------B99525DD670534556A39FED7 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit returning null broke a vlc media player built with gettext support --------------B99525DD670534556A39FED7 Content-Type: text/x-patch; name="bind_textdomain_codeset.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bind_textdomain_codeset.patch" >From 2f79aa294db5d9230ad71298e3de4b5561b441be Mon Sep 17 00:00:00 2001 From: Laine Gholson 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 --------------B99525DD670534556A39FED7--