예제 #1
0
        public static void Test()
        {
            HashSet <int> values  = new HashSet <int>();
            HashSet <int> indices = new HashSet <int>();

            foreach (var h in new[] { 0x81, 0x85 })
            {
                for (int l = 0; l < 256; l++)
                {
                    if (l == 0x80)
                    {
                        continue;
                    }

                    int index = FFXIIIEncodingMap.ValueToIndex(h, l);
                    if (!indices.Add(index))
                    {
                        throw new NotImplementedException();
                    }

                    //int hight;
                    //int low;
                    //FFXIIITextEncoder.IndexToValue(index, out hight, out low);
                    //int value = (hight << 8) | low;
                    //
                    //if (h != hight || l != low)
                    //    throw new NotImplementedException();
                    //
                    //if (!values.Add(value))
                    //    throw new NotImplementedException();
                }
            }
        }
예제 #2
0
        private static void CreateAdditionalCharacters(char[] chars)
        {
            //chars[256] = 's'; // Spanish

            chars[FFXIIIEncodingMap.ValueToIndex(0x8141)] = '、';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8142)] = '。';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8145)] = '・';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8146)] = '︓';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8148)] = '︖';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8149)] = '︕';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8151)] = '_';
            chars[FFXIIIEncodingMap.ValueToIndex(0x815B)] = '—';
            chars[FFXIIIEncodingMap.ValueToIndex(0x815C)] = '―';
            chars[FFXIIIEncodingMap.ValueToIndex(0x815E)] = '/';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8160)] = '〜';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8163)] = '…';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8169)] = '(';
            chars[FFXIIIEncodingMap.ValueToIndex(0x816A)] = ')';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8173)] = '《';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8174)] = '》';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8175)] = '「';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8176)] = '」';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8179)] = '【';
            chars[FFXIIIEncodingMap.ValueToIndex(0x817A)] = '】';
            chars[FFXIIIEncodingMap.ValueToIndex(0x817B)] = '+';
            chars[FFXIIIEncodingMap.ValueToIndex(0x817C)] = '-';
            chars[FFXIIIEncodingMap.ValueToIndex(0x817E)] = '✕';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8181)] = '=';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8183)] = '<';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8184)] = '>';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8187)] = '∞';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8193)] = '%';
            chars[FFXIIIEncodingMap.ValueToIndex(0x8195)] = '&';
            chars[FFXIIIEncodingMap.ValueToIndex(0x819A)] = '★';
            chars[FFXIIIEncodingMap.ValueToIndex(0x819B)] = '◯';
            chars[FFXIIIEncodingMap.ValueToIndex(0x81A0)] = '⬜';
            chars[FFXIIIEncodingMap.ValueToIndex(0x81A2)] = '△';
            chars[FFXIIIEncodingMap.ValueToIndex(0x81A6)] = '⁜';
            chars[FFXIIIEncodingMap.ValueToIndex(0x81A8)] = '→';
            chars[FFXIIIEncodingMap.ValueToIndex(0x81A9)] = '←';
            chars[FFXIIIEncodingMap.ValueToIndex(0x81AA)] = '↑';
            chars[FFXIIIEncodingMap.ValueToIndex(0x81AB)] = '↓';
            chars[FFXIIIEncodingMap.ValueToIndex(0x81F4)] = '♬';
        }