diff mbox

Remove obsolete aliases that broke 'locale -a'

Message ID 5554D965.8050100@cs.ucla.edu
State Committed
Headers show

Commit Message

Paul Eggert May 14, 2015, 5:20 p.m. UTC
On 05/14/2015 09:17 AM, Carlos O'Donell wrote:
> This looks like your ChangeLog entry is not in UTF-8?

No, it's a problem in transmission.  The actual patch is a mixture of 
UTF-8 and Latin-1 encoding.  I sent it via Thunderbird, which doesn't 
know its encoding and says only "Content-Type: text/x-patch" without 
specifying a character set for the attachment.  The body of the 
attachment, generated by Git, says "Content-Type: text/plain; 
charset=UTF-8" which is not correct, as the attachment body uses some 
UTF-8 and some Latin-1.

If I save the attachment into a file FOO, and edit FOO with Emacs, Emacs 
ignores the charset declaration and infers Latin-1 since FOO can't 
possibly be UTF-8, which botches display of the UTF-characters (the 
botch you noticed).  If I then type 'C-x RET r U T F - 8 RET y e s RET', 
Emacs will show the patch as UTF-8 instead of Latin-1, which will fix 
the botch you noticed but will mess up display of the old contents of 
locale.aliases.

What a mess, huh?

> Could you please convert this file to UTF-8 instead of ISO-8859?
>

Sure, revised patch attached.  It'll have the same transmission problems 
as before, and if you force Emacs to read it in UTF-8 only the old lines 
will be botched.
diff mbox

Patch

From 442fe29ef8cb66f8a1c012705a75b6d9a57111ce Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 14 May 2015 10:18:11 -0700
Subject: [PATCH] Remove obsolete aliases that broke 'locale -a'
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[BZ #18412]
* intl/locale.alias: Remove obsolete aliases "bokmål" and "français"
which caused 'locale -a' to output Latin-1 data in UTF-8 locales,
breaking some applications that use 'locale -a' output.
Change the encoding of this file from Latin-1 to UTF-8
(this affects only the file's comments now).
---
 ChangeLog         | 7 +++++++
 intl/locale.alias | 9 +++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e89c14e..2346fcf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@ 
+2015-05-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+	[BZ #18412]
+	* intl/locale.alias: Remove obsolete aliases "bokmål" and "français"
+	which caused 'locale -a' to output Latin-1 data in UTF-8 locales,
+	breaking some applications that use 'locale -a' output.
+
 2015-05-14  Andrew Senkevich  <andrew.senkevich@intel.com>
 
 	* Makeconfig (rpath-dirs, all-subdirs): Added mathvec folder.
diff --git a/intl/locale.alias b/intl/locale.alias
index ab1cb7a..ca4e777 100644
--- a/intl/locale.alias
+++ b/intl/locale.alias
@@ -24,8 +24,14 @@ 
 # backward compatibility.  Nobody should rely on the names defined here.
 # Locales should always be specified by their full name.
 
+# Note: This file used to contain the following lines encoded in Latin-1:
+#	bokmål		nb_NO.ISO-8859-1
+#	français	fr_FR.ISO-8859-1
+# These lines were removed because they caused 'locale -a' to output
+# text encoded in Latin-1, which broke applications in UTF-8 locales.  See:
+# https://sourceware.org/bugzilla/show_bug.cgi?id=18412
+
 bokmal		nb_NO.ISO-8859-1
-bokmål		nb_NO.ISO-8859-1
 catalan		ca_ES.ISO-8859-1
 croatian	hr_HR.ISO-8859-2
 czech		cs_CZ.ISO-8859-2
@@ -36,7 +42,6 @@  dutch		nl_NL.ISO-8859-1
 eesti		et_EE.ISO-8859-1
 estonian	et_EE.ISO-8859-1
 finnish         fi_FI.ISO-8859-1
-français	fr_FR.ISO-8859-1
 french		fr_FR.ISO-8859-1
 galego		gl_ES.ISO-8859-1
 galician	gl_ES.ISO-8859-1
-- 
2.1.0