{
int [] propStarts = new int [] {
0, 0x0910, 0x1B00, 0x2460, 0x2980,
- 0x2C70, 0x2D60, 0x2E90, 0xA770, 0xF900,
+ 0x2C70, 0x2D60, 0x2E90, 0xA770, 0xA7F0, 0xF900,
// 0x1D100, 0x2f800, 0x2fa10
};
int [] propEnds = new int [] {
0x06E0, 0x1200, 0x2330, 0x2600, 0x2AE0,
- 0x2C80, 0x2D70, 0x3400, 0xA780, 0x10000,
+ 0x2C80, 0x2D70, 0x3400, 0xA780, 0xA800, 0x10000,
// 0x1D800, 0x2f810, 0x2fa20
};
int [] mapStarts = new int [] {
// be identical to the corresponding
// ASCII latins.
if (c != target && diacritical [cp] == 0) {
- diacriticalOffset [c - 'A']++;
- diacritical [cp] = (byte) (diacriticalOffset [c - 'A'] + 0x7C);
+ var diaidx = c - 'A';
+ if (diaidx < 0 || diaidx >= diacritical.Length)
+ Console.Error.WriteLine ("!!!!! warning: unexpected LATIN character: {0:X}", cp);
+ else {
+ diacriticalOffset [diaidx]++;
+ diacritical [cp] = (byte) (diacriticalOffset [diaidx] + 0x7C);
+ }
}
}
}
category = "chs";
arr = cjkCHS;
offset = 0;//char.MaxValue - arr.Length;
- doc.Load (zhXML);
+ using (var xr = XmlReader.Create (zhXML, new XmlReaderSettings () { XmlResolver = null, ProhibitDtd = false }))
+ doc.Load (xr);
s = doc.SelectSingleNode ("/ldml/collations/collation[@type='pinyin']/rules/pc").InnerText;
v = 0x8008;
foreach (char c in s) {
category = "ko";
arr = cjkKO;
offset = 0;//char.MaxValue - arr.Length;
- doc.Load (koXML);
+ using (var xr = XmlReader.Create (koXML, new XmlReaderSettings () { XmlResolver = null, ProhibitDtd = false }))
+ doc.Load (xr);
foreach (XmlElement reset in doc.SelectNodes ("/ldml/collations/collation/rules/reset")) {
XmlElement sc = (XmlElement) reset.NextSibling;
// compute "category" and "level 1" for the
length = 1;
}
+ if (primaryChar >= map.Length) {
+ Console.Error.WriteLine ("!!!!! warning: unexpected primary char {0:X}", i);
+ continue;
+ }
if (map [primaryChar].Level1 == 0)
continue;