This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Alias for ISO-10646-UCS-2 charset



Certain embedded devices use the ISO-10646-UCS-2 charset; it is currently not possible for glibc's iconv to translate messages from those devices.


The ISO-10646-UCS-2 charset is an older character set that was superseded by UTF-16 of the Unicode standard in July 1996.

UCS-2 and UTF-16 are identical for purposes of data exchange. Both are 16 bit formats and have exactly the same code unit representation.

UCS-2 does not support supplementary characters and doesn't interpret pairs of surrogate code points as characters.

Given they are identical for data exchange, the easiest way to support this charset is to create an alias.

The attached patch adds the alias and fixes this problem. Fedora has been using this since Jan 2012 and the downstream bug reporter has been using it since early 2011.



diff --git a/ChangeLog b/ChangeLog
index 2f72afe..ec517f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2012-12-05  Jeff Law  <law@redhat.com>
 
+	* iconvdata/gconv-modules (ISO-10646-UCS-2): Add alias entry.
+
 	* sunrpc/etc.rpc (fedfs_admin): Add entry.
 
 2012-12-05  Joseph Myers  <joseph@codesourcery.com>
diff --git a/iconvdata/gconv-modules b/iconvdata/gconv-modules
index f857e22..d640ea4 100644
--- a/iconvdata/gconv-modules
+++ b/iconvdata/gconv-modules
@@ -1968,3 +1968,6 @@ alias	HPGREEK8//		HP-GREEK8//
 alias	OSF10010004//		HP-GREEK8//
 module	HP-GREEK8//		INTERNAL		HP-GREEK8	1
 module	INTERNAL		HP-GREEK8//		HP-GREEK8	1
+
+alias	ISO-10646-UCS-2//	UNICODE//
+alias	ISO-10646-UCS-2//	ISO-10646/UTF8/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]