converted all characters with codepoints higher than 255 to \uHEX format

Originally committed to SVN as r1633.
This commit is contained in:
Karl Blomster 2007-10-29 15:15:28 +00:00
parent 5859b4c9c0
commit c8db0d4424

View file

@ -1,4 +1,4 @@
// Copyright (c) 2006, Rodrigo Braz Monteiro
\ufeff// Copyright (c) 2006, Rodrigo Braz Monteiro
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@ -47,216 +47,216 @@ KanaTable::KanaTable() {
groups[1] = 0;
BeginGroup();
Insert(L"",L"",L"a");
Insert(L"",L"",L"i");
Insert(L"",L"",L"u");
Insert(L"",L"",L"e");
Insert(L"",L"",L"o");
Insert(L"\u3042",L"\u30a2",L"a");
Insert(L"\u3044",L"\u30a4",L"i");
Insert(L"\u3046",L"\u30a6",L"u");
Insert(L"\u3048",L"\u30a8",L"e");
Insert(L"\u304a",L"\u30aa",L"o");
BeginGroup();
Insert(L"",L"",L"ka");
Insert(L"",L"",L"ki");
Insert(L"",L"",L"ku");
Insert(L"",L"",L"ke");
Insert(L"",L"",L"ko");
Insert(L"\u304b",L"\u30ab",L"ka");
Insert(L"\u304d",L"\u30ad",L"ki");
Insert(L"\u304f",L"\u30af",L"ku");
Insert(L"\u3051",L"\u30b1",L"ke");
Insert(L"\u3053",L"\u30b3",L"ko");
BeginGroup();
Insert(L"",L"",L"sa");
Insert(L"",L"",L"shi");
Insert(L"",L"",L"su");
Insert(L"",L"",L"se");
Insert(L"",L"",L"so");
Insert(L"\u3055",L"\u30b5",L"sa");
Insert(L"\u3057",L"\u30b7",L"shi");
Insert(L"\u3059",L"\u30b9",L"su");
Insert(L"\u305b",L"\u30bb",L"se");
Insert(L"\u305d",L"\u30bd",L"so");
BeginGroup();
Insert(L"",L"",L"ta");
Insert(L"",L"",L"chi");
Insert(L"",L"",L"tsu");
Insert(L"",L"",L"te");
Insert(L"",L"",L"to");
Insert(L"\u305f",L"\u30bf",L"ta");
Insert(L"\u3061",L"\u30c1",L"chi");
Insert(L"\u3064",L"\u30c4",L"tsu");
Insert(L"\u3066",L"\u30c6",L"te");
Insert(L"\u3068",L"\u30c8",L"to");
BeginGroup();
Insert(L"",L"",L"na");
Insert(L"",L"",L"ni");
Insert(L"",L"",L"nu");
Insert(L"",L"",L"ne");
Insert(L"",L"",L"no");
Insert(L"\u306a",L"\u30ca",L"na");
Insert(L"\u306b",L"\u30cb",L"ni");
Insert(L"\u306c",L"\u30cc",L"nu");
Insert(L"\u306d",L"\u30cd",L"ne");
Insert(L"\u306e",L"\u30ce",L"no");
BeginGroup();
Insert(L"",L"",L"ha");
Insert(L"",L"",L"hi");
Insert(L"",L"",L"fu");
Insert(L"",L"",L"he");
Insert(L"",L"",L"ho");
Insert(L"\u306f",L"\u30cf",L"ha");
Insert(L"\u3072",L"\u30d2",L"hi");
Insert(L"\u3075",L"\u30d5",L"fu");
Insert(L"\u3078",L"\u30d8",L"he");
Insert(L"\u307b",L"\u30db",L"ho");
BeginGroup();
Insert(L"",L"",L"ma");
Insert(L"",L"",L"mi");
Insert(L"",L"",L"mu");
Insert(L"",L"",L"me");
Insert(L"",L"",L"mo");
Insert(L"\u307e",L"\u30de",L"ma");
Insert(L"\u307f",L"\u30df",L"mi");
Insert(L"\u3080",L"\u30e0",L"mu");
Insert(L"\u3081",L"\u30e1",L"me");
Insert(L"\u3082",L"\u30e2",L"mo");
BeginGroup();
Insert(L"",L"",L"ya");
Insert(L"",L"",L"yu");
Insert(L"",L"",L"yo");
Insert(L"\u3084",L"\u30e4",L"ya");
Insert(L"\u3086",L"\u30e6",L"yu");
Insert(L"\u3088",L"\u30e8",L"yo");
BeginGroup();
Insert(L"",L"",L"ra");
Insert(L"",L"",L"ri");
Insert(L"",L"",L"ru");
Insert(L"",L"",L"re");
Insert(L"",L"",L"ro");
Insert(L"\u3089",L"\u30e9",L"ra");
Insert(L"\u308a",L"\u30ea",L"ri");
Insert(L"\u308b",L"\u30eb",L"ru");
Insert(L"\u308c",L"\u30ec",L"re");
Insert(L"\u308d",L"\u30ed",L"ro");
BeginGroup();
Insert(L"",L"",L"wa");
Insert(L"",L"",L"wi");
Insert(L"",L"",L"we");
Insert(L"",L"",L"wo");
Insert(L"\u308f",L"\u30ef",L"wa");
Insert(L"\u3090",L"\u30f0",L"wi");
Insert(L"\u3091",L"\u30f1",L"we");
Insert(L"\u3092",L"\u30f2",L"wo");
BeginGroup();
level--;
Insert(L"",L"",L"n");
Insert(L"\u3093",L"\u30f3",L"n");
BeginGroup();
Insert(L"",L"",L"ga");
Insert(L"",L"",L"gi");
Insert(L"",L"",L"gu");
Insert(L"",L"",L"ge");
Insert(L"",L"",L"go");
Insert(L"\u304c",L"\u30ac",L"ga");
Insert(L"\u304e",L"\u30ae",L"gi");
Insert(L"\u3050",L"\u30b0",L"gu");
Insert(L"\u3052",L"\u30b2",L"ge");
Insert(L"\u3054",L"\u30b4",L"go");
BeginGroup();
Insert(L"",L"",L"za");
Insert(L"",L"",L"ji");
Insert(L"",L"",L"zu");
Insert(L"",L"",L"ze");
Insert(L"",L"",L"zo");
Insert(L"\u3056",L"\u30b6",L"za");
Insert(L"\u3058",L"\u30b8",L"ji");
Insert(L"\u305a",L"\u30ba",L"zu");
Insert(L"\u305c",L"\u30bc",L"ze");
Insert(L"\u305e",L"\u30be",L"zo");
BeginGroup();
Insert(L"",L"",L"da");
Insert(L"",L"",L"ji");
Insert(L"",L"",L"zu");
Insert(L"",L"",L"de");
Insert(L"",L"",L"do");
Insert(L"\u3060",L"\u30c0",L"da");
Insert(L"\u3062",L"\u30c2",L"ji");
Insert(L"\u3065",L"\u30c5",L"zu");
Insert(L"\u3067",L"\u30c7",L"de");
Insert(L"\u3069",L"\u30c9",L"do");
BeginGroup();
Insert(L"",L"",L"ba");
Insert(L"",L"",L"bi");
Insert(L"",L"",L"bu");
Insert(L"",L"",L"be");
Insert(L"",L"",L"bo");
Insert(L"\u3070",L"\u30d0",L"ba");
Insert(L"\u3073",L"\u30d3",L"bi");
Insert(L"\u3076",L"\u30d6",L"bu");
Insert(L"\u3079",L"\u30d9",L"be");
Insert(L"\u307c",L"\u30dc",L"bo");
BeginGroup();
Insert(L"",L"",L"pa");
Insert(L"",L"",L"pi");
Insert(L"",L"",L"pu");
Insert(L"",L"",L"pe");
Insert(L"",L"",L"po");
Insert(L"\u3071",L"\u30d1",L"pa");
Insert(L"\u3074",L"\u30d4",L"pi");
Insert(L"\u3077",L"\u30d7",L"pu");
Insert(L"\u307a",L"\u30da",L"pe");
Insert(L"\u307d",L"\u30dd",L"po");
BeginGroup();
Insert(L"きゃ",L"キャ",L"kya");
Insert(L"きゅ",L"キュ",L"kyu");
Insert(L"きょ",L"キョ",L"kyo");
Insert(L"\u304d\u3083",L"\u30ad\u30e3",L"kya");
Insert(L"\u304d\u3085",L"\u30ad\u30e5",L"kyu");
Insert(L"\u304d\u3087",L"\u30ad\u30e7",L"kyo");
BeginGroup();
Insert(L"しゃ",L"シャ",L"sha");
Insert(L"しゅ",L"シュ",L"shu");
Insert(L"しょ",L"ショ",L"sho");
Insert(L"\u3057\u3083",L"\u30b7\u30e3",L"sha");
Insert(L"\u3057\u3085",L"\u30b7\u30e5",L"shu");
Insert(L"\u3057\u3087",L"\u30b7\u30e7",L"sho");
BeginGroup();
Insert(L"ちゃ",L"チャ",L"cha");
Insert(L"ちゅ",L"チュ",L"chu");
Insert(L"ちょ",L"チョ",L"cho");
Insert(L"\u3061\u3083",L"\u30c1\u30e3",L"cha");
Insert(L"\u3061\u3085",L"\u30c1\u30e5",L"chu");
Insert(L"\u3061\u3087",L"\u30c1\u30e7",L"cho");
BeginGroup();
Insert(L"にゃ",L"ニャ",L"nya");
Insert(L"にゅ",L"ニュ",L"nyu");
Insert(L"にょ",L"ニョ",L"nyo");
Insert(L"\u306b\u3083",L"\u30cb\u30e3",L"nya");
Insert(L"\u306b\u3085",L"\u30cb\u30e5",L"nyu");
Insert(L"\u306b\u3087",L"\u30cb\u30e7",L"nyo");
BeginGroup();
Insert(L"ひゃ",L"ヒャ",L"hya");
Insert(L"ひゅ",L"ヒュ",L"hyu");
Insert(L"ひょ",L"ヒョ",L"hyo");
Insert(L"\u3072\u3083",L"\u30d2\u30e3",L"hya");
Insert(L"\u3072\u3085",L"\u30d2\u30e5",L"hyu");
Insert(L"\u3072\u3087",L"\u30d2\u30e7",L"hyo");
BeginGroup();
Insert(L"みゃ",L"ミャ",L"mya");
Insert(L"みゅ",L"ミュ",L"myu");
Insert(L"みょ",L"ミョ",L"myo");
Insert(L"\u307f\u3083",L"\u30df\u30e3",L"mya");
Insert(L"\u307f\u3085",L"\u30df\u30e5",L"myu");
Insert(L"\u307f\u3087",L"\u30df\u30e7",L"myo");
BeginGroup();
Insert(L"りゃ",L"リャ",L"rya");
Insert(L"りゅ",L"リュ",L"ryu");
Insert(L"りょ",L"リョ",L"ryo");
Insert(L"\u308a\u3083",L"\u30ea\u30e3",L"rya");
Insert(L"\u308a\u3085",L"\u30ea\u30e5",L"ryu");
Insert(L"\u308a\u3087",L"\u30ea\u30e7",L"ryo");
BeginGroup();
Insert(L"ぎゃ",L"ギャ",L"gya");
Insert(L"ぎゅ",L"ギュ",L"gyu");
Insert(L"ぎょ",L"ギョ",L"gyo");
Insert(L"\u304e\u3083",L"\u30ae\u30e3",L"gya");
Insert(L"\u304e\u3085",L"\u30ae\u30e5",L"gyu");
Insert(L"\u304e\u3087",L"\u30ae\u30e7",L"gyo");
BeginGroup();
Insert(L"じゃ",L"ジャ",L"ja");
Insert(L"じゅ",L"ジュ",L"ju");
Insert(L"じょ",L"ジョ",L"jo");
Insert(L"\u3058\u3083",L"\u30b8\u30e3",L"ja");
Insert(L"\u3058\u3085",L"\u30b8\u30e5",L"ju");
Insert(L"\u3058\u3087",L"\u30b8\u30e7",L"jo");
BeginGroup();
Insert(L"ぢゃ",L"ヂャ",L"ja");
Insert(L"ぢゅ",L"ヂュ",L"ju");
Insert(L"ぢょ",L"ヂョ",L"jo");
Insert(L"\u3062\u3083",L"\u30c2\u30e3",L"ja");
Insert(L"\u3062\u3085",L"\u30c2\u30e5",L"ju");
Insert(L"\u3062\u3087",L"\u30c2\u30e7",L"jo");
BeginGroup();
Insert(L"びゃ",L"ビャ",L"bya");
Insert(L"びゅ",L"ビュ",L"byu");
Insert(L"びょ",L"ビョ",L"byo");
Insert(L"\u3073\u3083",L"\u30d3\u30e3",L"bya");
Insert(L"\u3073\u3085",L"\u30d3\u30e5",L"byu");
Insert(L"\u3073\u3087",L"\u30d3\u30e7",L"byo");
BeginGroup();
Insert(L"ぴゃ",L"ピャ",L"pya");
Insert(L"ぴゅ",L"ピュ",L"pyu");
Insert(L"ぴょ",L"ピョ",L"pyo");
Insert(L"\u3074\u3083",L"\u30d4\u30e3",L"pya");
Insert(L"\u3074\u3085",L"\u30d4\u30e5",L"pyu");
Insert(L"\u3074\u3087",L"\u30d4\u30e7",L"pyo");
BeginGroup();
Insert(L"",L"ファ",L"fa");
Insert(L"",L"フィ",L"fi");
Insert(L"",L"フェ",L"fe");
Insert(L"",L"フォ",L"fo");
Insert(L"",L"\u30d5\u30a1",L"fa");
Insert(L"",L"\u30d5\u30a3",L"fi");
Insert(L"",L"\u30d5\u30a7",L"fe");
Insert(L"",L"\u30d5\u30a9",L"fo");
BeginGroup();
Insert(L"",L"ヴァ",L"va");
Insert(L"",L"ヴィ",L"vi");
Insert(L"",L"",L"vu");
Insert(L"",L"ヴェ",L"ve");
Insert(L"",L"ヴォ",L"vo");
Insert(L"",L"フュ",L"fyu");
Insert(L"",L"\u30f4\u30a1",L"va");
Insert(L"",L"\u30f4\u30a3",L"vi");
Insert(L"",L"\u30f4",L"vu");
Insert(L"",L"\u30f4\u30a7",L"ve");
Insert(L"",L"\u30f4\u30a9",L"vo");
Insert(L"",L"\u30d5\u30e5",L"fyu");
BeginGroup();
Insert(L"",L"イェ",L"ye");
Insert(L"",L"ウィ",L"wi");
Insert(L"",L"ウェ",L"we");
Insert(L"",L"ウォ",L"wo");
Insert(L"",L"\u30a4\u30a7",L"ye");
Insert(L"",L"\u30a6\u30a3",L"wi");
Insert(L"",L"\u30a6\u30a7",L"we");
Insert(L"",L"\u30a6\u30a9",L"wo");
BeginGroup();
Insert(L"",L"ヴャ",L"vya");
Insert(L"",L"ヴュ",L"vyu");
Insert(L"",L"ヴョ",L"vyo");
Insert(L"",L"\u30f4\u30e3",L"vya");
Insert(L"",L"\u30f4\u30e5",L"vyu");
Insert(L"",L"\u30f4\u30e7",L"vyo");
BeginGroup();
Insert(L"",L"シェ",L"she");
Insert(L"",L"ジェ",L"je");
Insert(L"",L"チェ",L"che");
Insert(L"",L"\u30b7\u30a7",L"she");
Insert(L"",L"\u30b8\u30a7",L"je");
Insert(L"",L"\u30c1\u30a7",L"che");
BeginGroup();
Insert(L"",L"ティ",L"ti");
Insert(L"",L"テゥ",L"tu");
Insert(L"",L"テュ",L"tyu");
Insert(L"",L"\u30c6\u30a3",L"ti");
Insert(L"",L"\u30c6\u30a5",L"tu");
Insert(L"",L"\u30c6\u30e5",L"tyu");
BeginGroup();
Insert(L"",L"ディ",L"di");
Insert(L"",L"デゥ",L"du");
Insert(L"",L"デゥ",L"dyu");
Insert(L"",L"\u30c7\u30a3",L"di");
Insert(L"",L"\u30c7\u30a5",L"du");
Insert(L"",L"\u30c7\u30a5",L"dyu");
BeginGroup();
Insert(L"",L"ツァ",L"tsa");
Insert(L"",L"ツィ",L"tsi");
Insert(L"",L"ツェ",L"tse");
Insert(L"",L"ツォ",L"tso");
Insert(L"",L"\u30c4\u30a1",L"tsa");
Insert(L"",L"\u30c4\u30a3",L"tsi");
Insert(L"",L"\u30c4\u30a7",L"tse");
Insert(L"",L"\u30c4\u30a9",L"tso");
}
@ -360,12 +360,12 @@ wxString KanaTable::KanaToRomaji(wxString kana,int type) {
// Check if it's little tsu or long vowel in katakana
if (!cur) {
if (kana.Mid(i,1) == _T("") || kana.Mid(i,1) == _T("") || kana.Mid(i,1) == _T("")) {
if (kana.Mid(i,1) == _T("\u3063") || kana.Mid(i,1) == _T("\uff6f") || kana.Mid(i,1) == _T("\u30c3")) {
ltsu = true;
continue;
}
if (kana.Mid(i,1) == _T("") || kana.Mid(i,1) == _T("-")) {
if (kana.Mid(i,1) == _T("\u30fc") || kana.Mid(i,1) == _T("-")) {
longVowel = true;
}
}
@ -389,7 +389,7 @@ wxString KanaTable::KanaToRomaji(wxString kana,int type) {
fl = cur->hepburn.Left(1);
bool add = false;
if (fl == _T("y") || fl == _T("a") || fl == _T("e") || fl == _T("i") || fl == _T("o") || fl == _T("u")) add = true;
if (fl == _T("n") && cur->hiragana == _T("")) add = true;
if (fl == _T("n") && cur->hiragana == _T("\u3063")) add = true;
if (add) final += _T("'");
}