summaryrefslogtreecommitdiffstats
path: root/sys/sys/iconv.h
diff options
context:
space:
mode:
authorimura <imura@FreeBSD.org>2005-07-03 01:12:37 +0000
committerimura <imura@FreeBSD.org>2005-07-03 01:12:37 +0000
commita4baf63c50a1ccd3fd4c3e80de73c50eedef5241 (patch)
tree661d95b37c9a607bdeb6832ea1946138443a54af /sys/sys/iconv.h
parent9e64e57e54a92f1dcb01125eafa15a65af897cdc (diff)
downloadFreeBSD-src-a4baf63c50a1ccd3fd4c3e80de73c50eedef5241.zip
FreeBSD-src-a4baf63c50a1ccd3fd4c3e80de73c50eedef5241.tar.gz
Switch Unicode charset name from "ISO-10646-UCS-2" to "UTF-16BE".
Using ISO-10646-UCS-2 will cause a problem when we use our own iconv functions in the future, or port iconv other than GNU libiconv. Each vendors treat "UCS-2" as follows, and endian issue is vendor specific: - Solaris 8 iconv Little Endian with BOM - HP-UX iconv Big Endian - NetBSD/i386 1.6 iconv Little Endian - GNU libiconv Big Endian - glibc(RedHat AS 2.1 x86) iconv Little Endian - IANA Name: ISO-10646-UCS-2 MIBenum: 1000 Source: the 2-octet Basic Multilingual Plane, aka Unicode this needs to specify network byte order: the standard does not specify (it is a 16-bit integer space) Alias: csUnicode - MSDN Little Endian http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemtextencodingclassgetencodingtopic2.asp Now using UTF-16BE is harmless, because - same as UCS-2 with 2 byte range (U+0000 - U+FFFF) - kernel code of each file systems(cd9660, msdosfs, ntfs) believes Unicode is a 2 byte character at this time. - UDF has only 2 byte range of Unicode filenames. - It's defined at RFC2781. So I believe it's time to change before starting new RELENG_6. :) Approved by: re (scottl)
Diffstat (limited to 'sys/sys/iconv.h')
-rw-r--r--sys/sys/iconv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/iconv.h b/sys/sys/iconv.h
index b0de40c..90ea3db 100644
--- a/sys/sys/iconv.h
+++ b/sys/sys/iconv.h
@@ -88,7 +88,7 @@ struct iconv_add_out {
__BEGIN_DECLS
-#define ENCODING_UNICODE "ISO-10646-UCS-2"
+#define ENCODING_UNICODE "UTF-16BE"
#define KICONV_VENDOR_MICSFT 1 /* Microsoft Vendor Code for quirk */
int kiconv_add_xlat_table(const char *, const char *, const u_char *);
OpenPOWER on IntegriCloud