Looks like Be and Andrew mixed up UCS-2 and UTF-16; I added the UTF-16 conversion as well
now (which has a marker at the beginning of the file, unlike UCS-2). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19843 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -165,10 +165,10 @@ static const char * unicode2aliases[] = {
|
|||||||
// IANA aliases
|
// IANA aliases
|
||||||
"csUnicode",
|
"csUnicode",
|
||||||
// java aliases
|
// java aliases
|
||||||
"UTF_16BE", "X-UTF-16BE", "UnicodeBigUnmarked",
|
"UTF-16BE", "X-UTF-16BE", "UnicodeBigUnmarked",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
static const BCharacterSet unicode2(16,1000,"Unicode (UTF-16)","ISO-10646-UCS-2",NULL,unicode2aliases);
|
static const BCharacterSet unicode2(16,1000,"Unicode (UCS-2)","ISO-10646-UCS-2",NULL,unicode2aliases);
|
||||||
|
|
||||||
static const char * KOI8Raliases[] = {
|
static const char * KOI8Raliases[] = {
|
||||||
// IANA aliases
|
// IANA aliases
|
||||||
@@ -262,6 +262,16 @@ static const char * gb18030aliases[] = {
|
|||||||
};
|
};
|
||||||
static const BCharacterSet gb18030(26,114,"Chinese GB18030","GB18030",NULL,gb18030aliases);
|
static const BCharacterSet gb18030(26,114,"Chinese GB18030","GB18030",NULL,gb18030aliases);
|
||||||
|
|
||||||
|
static const char* kUTF16Aliases[] = {
|
||||||
|
// IANA aliases
|
||||||
|
"UTF-16",
|
||||||
|
// java aliases
|
||||||
|
"UTF-16BE", "X-UTF-16BE", "UnicodeBigUnmarked",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const BCharacterSet kUTF16(27, 1000, "Unicode", "UTF-16", "UTF-16",
|
||||||
|
kUTF16Aliases);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The following initializes the global character set array.
|
* The following initializes the global character set array.
|
||||||
* It is organized by id for efficient retrieval using predefined constants in UTF8.h and Font.h.
|
* It is organized by id for efficient retrieval using predefined constants in UTF8.h and Font.h.
|
||||||
@@ -281,6 +291,7 @@ const BCharacterSet * character_sets_by_id[] = {
|
|||||||
&IBM866, &IBM437, &eucKR, &iso13, &iso14, &iso15,
|
&IBM866, &IBM437, &eucKR, &iso13, &iso14, &iso15,
|
||||||
// R5 convert_to/from_utf8 encodings end here
|
// R5 convert_to/from_utf8 encodings end here
|
||||||
&big5,&gb18030,
|
&big5,&gb18030,
|
||||||
|
&kUTF16,
|
||||||
};
|
};
|
||||||
const uint32 character_sets_by_id_count = sizeof(character_sets_by_id)/sizeof(const BCharacterSet*);
|
const uint32 character_sets_by_id_count = sizeof(character_sets_by_id)/sizeof(const BCharacterSet*);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user