6843578: Re-implement IBM doublebyte charsets

6639450: IBM949C encoder modifies state of IBM949 encoder
6569191: Cp943 io converter returns U+0000 and U+FFFD for unconvertable character
6577466: Character encoder IBM970 throws a BufferOverflowException
5065777: CharsetEncoder canEncode() methods often incorrectly return false

Re-write 11 IBM doublebyte charsets. Thanks Ulf.Zibis for the codereview!

Reviewed-by: martin
This commit is contained in:
Xueming Shen 2009-05-21 23:32:46 -07:00
parent 6178f3c373
commit f625a6d545
108 changed files with 166823 additions and 4243 deletions
jdk
make
src/share/classes/sun
test/sun/nio/cs

@ -375,7 +375,20 @@ FILES_gen_extcs = \
sun/nio/cs/ext/MacTurkish.java \
sun/nio/cs/ext/MacUkraine.java \
sun/nio/cs/ext/TIS_620.java \
sun/nio/cs/ext/EUC_TWMapping.java
sun/nio/cs/ext/EUC_TWMapping.java \
sun/nio/cs/ext/IBM1381.java \
sun/nio/cs/ext/IBM1383.java \
sun/nio/cs/ext/IBM930.java \
sun/nio/cs/ext/IBM933.java \
sun/nio/cs/ext/IBM935.java \
sun/nio/cs/ext/IBM937.java \
sun/nio/cs/ext/IBM939.java \
sun/nio/cs/ext/IBM942.java \
sun/nio/cs/ext/IBM943.java \
sun/nio/cs/ext/IBM948.java \
sun/nio/cs/ext/IBM949.java \
sun/nio/cs/ext/IBM950.java \
sun/nio/cs/ext/IBM970.java
FILES_java = $(FILES_src) $(FILES_gen_extcs)

@ -60,7 +60,7 @@ endif # PLATFORM
# this define is for the rule:
CHARSETS_JAR = $(LIBDIR)/charsets.jar
# extsbcs
# extcs
FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java)
#
@ -90,13 +90,15 @@ $(FILES_DAT): $(FILES_MAP)
$(FILES_MAP) $(FILES_DAT) sjis0213
$(FILES_genout_extcs): $(GENCSDATASRC)/SingleByte-X.java $(GENCSDATASRC)/extsbcs
$(FILES_genout_extcs): $(GENCSDATASRC)/SingleByte-X.java $(GENCSDATASRC)/DoubleByte-X.java \
$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
@$(prep-target)
$(RM) -r $(GENCSEXT)
$(MKDIR) -p $(GENCSEXT)
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) extsbcs
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
$(GENCSSRCDIR)/GenerateEUC_TW.java
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
$(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)

@ -0,0 +1,100 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
// -- This file was mechanically generated: Do not edit! -- //
package $PACKAGE$;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.util.Arrays;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.DoubleByte;
public class $NAME_CLZ$ extends Charset
$IMPLEMENTS$
{
public $NAME_CLZ$() {
super("$NAME_CS$", $NAME_ALIASES$);
}
$HISTORICALNAME$
public boolean contains(Charset cs) {
$CONTAINS$
}
public CharsetDecoder newDecoder() {
initb2c();
return new DoubleByte.Decoder$DECTYPE$(this, b2c, b2cSB, $B2MIN$, $B2MAX$);
}
public CharsetEncoder newEncoder() {
initc2b();
return new DoubleByte.Encoder$ENCTYPE$(this, c2b, c2bIndex);
}
$B2C$
static char[][] b2c = new char[b2cStr.length][];
static char[] b2cSB;
private static volatile boolean b2cInitialized = false;
static void initb2c() {
if (b2cInitialized)
return;
synchronized (b2c) {
if (b2cInitialized)
return;
for (int i = 0; i < b2cStr.length; i++) {
if (b2cStr[i] == null)
b2c[i] = DoubleByte.B2C_UNMAPPABLE;
else
b2c[i] = b2cStr[i].toCharArray();
}
b2cSB = b2cSBStr.toCharArray();
b2cInitialized = true;
}
}
static char[] c2b = new char[$C2BLENGTH$];
static char[] c2bIndex = new char[0x100];
private static volatile boolean c2bInitialized = false;
static void initc2b() {
if (c2bInitialized)
return;
synchronized (c2b) {
if (c2bInitialized)
return;
$NONROUNDTRIP_B2C$
$NONROUNDTRIP_C2B$
DoubleByte.Encoder.initC2B(b2cStr, b2cSBStr, b2cNR, c2bNR,
$B2MIN$, $B2MAX$,
c2b, c2bIndex);
c2bInitialized = true;
}
}
}

@ -0,0 +1,4 @@
# See 4201529/4296969
A1AA 2014
A1A4 00B7
A1A4 7AC2

File diff suppressed because it is too large Load Diff

@ -0,0 +1,7 @@
# See 4201529/4296969
A1AA 2014
A1A4 00B7
A1A4 8EA2
FEEE F83D
FEF4 F83E

File diff suppressed because it is too large Load Diff

@ -0,0 +1,2 @@
FEF4 4EDD
FEEE FFE5

@ -0,0 +1,81 @@
#
# diff result of 03A234B0.TPMAP12A & 03A234B0.UXMAP120, with
#
# (1)added following entries from existing Cp930.java's c->b only
# encoding result.
#
# 6be1 -> 54d4 -> 5516
# 6d00 -> 5550 -> 6d9c
# 70ff -> 52ec -> 4fa0
# 841d -> 53e8 -> 8749
# 841f -> 52a1 -> 874b
# 8f91 -> 446e -> 2116
# 92ca -> 547d -> 565b
# 9b7e -> 53da -> 9a28
# f86f -> 446e -> 2116
#
# (2)entries does not exist in "old"
#
# 51F1 6805
# 53B3 8346
#
# (3)the 0x15 U+0085 entries for ebcdic
#
15 0085
#
54d4 6be1
5550 6d00
52ec 70ff
53e8 841d
52a1 841f
446e 8f91
547d 92ca
53da 9b7e
446e f86f
#
# we should use this one instead of the 4260<-ff0d
#4260 2212
4260 ff0d
#
426A 00A6
43A1 301C
444A 2014
447C 2016
4C7D 9E7C
4EB3 9830
4F5E 5861
507F 91AC
5190 56CA
51F1 6805
51FA 91B1
5261 9EB4
52A1 881F
52C9 840A
52DA 7E61
52EC 4FE0
5353 8EC0
5373 7E6B
53DA 9A52
53E8 87EC
53EE 7130
53F8 8523
5443 5C5B
5464 9DD7
547D 5699
5481 525D
54A3 6414
54A4 7626
54CA 7C1E
54CD 6451
54D4 555E
54FA 6F51
5550 7006
5553 79B1
555F 9EB5
55C0 5C62
55C1 985A
5B72 6522
5BFE 688E
60F1 7E48
61B0 8141
66C8 9839

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
25 000a

@ -0,0 +1 @@
15 0085

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
15 0085

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
25 000a

@ -0,0 +1,8 @@
15 0085
#
# see .map for more info regarding the following 5 entries
#445C F83E
#46A8 F83F
#46A9 F840
#46AA F841
#46AB F842

File diff suppressed because it is too large Load Diff

@ -0,0 +1,193 @@
#
25 000a
#
# following are from Cp937.nr
454A 5341
454C 5345
4841 4E00
4845 4E59
4847 4E8C
4849 4EBA
484A 513F
484B 5165
484C 516B
4850 51E0
4851 51F5
4852 5200
4853 529B
4855 5315
4856 531A
4858 5341
4859 535C
485B 5382
485D 53C8
485E 53E3
485F 56D7
4860 571F
4861 58EB
4863 5915
4864 5927
4865 5973
4866 5B50
4868 5BF8
4869 5C0F
486A 5C22
486B 5C38
486C 5C6E
486D 5C71
486F 5DE5
4870 5DF1
4871 5DFE
4872 5E72
4876 5EFE
4877 5F0B
4878 5F13
487B 5F73
487C 5FC3
487D 6208
487E 6236
487F 624B
4881 652F
4883 6587
4884 6597
4885 65A4
4886 65B9
4888 65E5
4889 66F0
488A 6708
488B 6728
488C 6B20
488D 6B62
488E 6B79
488F 6BB3
4890 6BCB
4891 6BD4
4892 6BDB
4893 6C0F
4894 6C14
4895 6C34
4896 706B
4897 722A
4898 7236
4899 723B
489A 723F
489B 7247
489C 7259
489D 725B
489E 72AC
489F 7384
48A0 7389
48A1 74DC
48A2 74E6
48A3 7518
48A4 751F
48A5 7528
48A6 7530
48A7 758B
48AA 767D
48AB 76AE
48AC 76BF
48AD 76EE
48AE 77DB
48AF 77E2
48B0 77F3
48B1 793A
48B2 79B8
48B3 79BE
48B4 7A74
48B5 7ACB
48B6 7AF9
48B7 7C73
48B8 7CF8
48B9 7F36
48BA 7F51
48BB 7F8A
48BC 7FBD
48BD 8001
48BE 800C
48BF 8012
48C0 8033
48C1 807F
48C2 8089
48C3 81E3
48C4 81EA
48C5 81F3
48C6 81FC
48C7 820C
48C8 821B
48C9 821F
48CA 826E
48CB 8272
48CC 8278
48CD 864D
48CE 866B
48CF 8840
48D0 884C
48D1 8863
48D2 897E
48D3 898B
48D4 89D2
48D5 8A00
48D6 8C37
48D7 8C46
48D8 8C55
48D9 8C78
48DA 8C9D
48DB 8D64
48DC 8D70
48DD 8DB3
48DE 8EAB
48DF 8ECA
48E0 8F9B
48E1 8FB0
48E3 9091
48E4 9149
48E5 91C6
48E6 91CC
48E7 91D1
48E8 9577
48E9 9580
48EA 961C
48EC 96B9
48ED 96E8
48EE 9752
48EF 975E
48F0 9762
48F1 9769
48F2 97CB
48F3 97ED
48F4 97F3
48F5 9801
48F6 98A8
48F7 98DB
48F8 98DF
48F9 9996
48FA 9999
48FB 99AC
48FC 9AA8
48FD 9AD8
4941 9ADF
4942 9B25
4943 9B2F
4944 9B32
4945 9B3C
4946 9B5A
4947 9CE5
4948 9E75
4949 9E7F
494A 9EA5
494B 9EBB
494C 9EC3
494D 9ECD
494E 9ED1
494F 9EF9
4950 9EFD
4951 9F0E
4952 9F13
4953 9F20
4954 9F3B
4955 9F4A
4956 9F52
4957 9F8D
4958 9F9C
4959 9FA0

@ -0,0 +1,62 @@
#
15 0085
#
# diff of:
# package2/939/03AB34B0.TPMAP12A
# package2/939/03AB34B0.UPMAP13A
#
4260 2212
426A 00A6
43A1 301C
444A 2014
446E F86F
447C 2016
4C7D 9E7C
4EB3 9830
4F5E 5861
507F 91AC
5190 56CA
51F1 6805
51FA 91B1
5261 9EB4
52A1 881F
52C9 840A
52DA 7E61
52EC 4FE0
5353 8EC0
5373 7E6B
53B3 8346
53DA 9A52
53E8 87EC
53EE 7130
53F8 8523
5443 5C5B
5464 9DD7
547D 5699
5481 525D
54A3 6414
54A4 7626
54CA 7C1E
54CD 6451
54D4 555E
54FA 6F51
5550 7006
5553 79B1
555F 9EB5
55C0 5C62
55C1 985A
5B72 6522
5BFE 688E
60F1 7E48
61B0 8141
66C8 9839
#
# see .map for details for following entries
54d4 6be1
5550 6d00
52ec 70ff
53e8 841d
52a1 841f
446e 8f91
547d 92ca
53da 9b7e

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
25 000a

@ -0,0 +1,84 @@
# diff of
# 03AE34B0.TPMAP110 (b2c)
# 03AE34B0.UPMAP120 (c2b)
# (1) removed "redundant" entries
# 5C 005C
# 7E 007E
# (2) have following "incompatible" entries compared
# to existing/old mappings
#
# (a) c->b only don't exist in old table
# 2015 815c 2014
# 2225 8161 2016
# 6805 8df2 67f5
# 8346 8c74 834a
# ff0d 817c 2212
# ff5e 8160 301c
# ffe4 fa55 a6
#
# (b) c->b only don't exist in new table
# 551e 90e4 8749
# 6d00 93c0 6d9c
# 6f1e 91cb 9a28
# 70ff 8ba0 4fa0
# 8741 88a0 5516
# 8f91 fa59 2116
# 92ca 8a9a 565b
#
# Warning: to compatible, added (b) into c2b table
#
90e4 551e
93c0 6d00
91cb 6f1e
8ba0 70ff
88a0 8741
fa59 8f91
8a9a 92ca
#
#
#
815C 2015
8160 FF5E
8161 2225
817C FF0D
88A0 555E
898B 7130
89A8 9DD7
8A9A 5699
8BA0 4FE0
8BEB 8EC0
8C71 7E6B
8C74 8346
8CB2 9E7C
8D8D 9EB4
8DF2 6805
8EC6 5C62
8F4A 7E61
8FD3 8523
8FDD 91AC
90E4 87EC
917E 6414
9189 7626
91CB 9A52
925C 7C1E
92CD 6451
9355 5861
935E 985A
9398 79B1
93C0 7006
9458 56CA
948D 525D
94AC 6F51
94AE 91B1
966A 9830
96CB 9EB5
9789 840A
9858 881F
9BA0 5C5B
9DB7 6522
9E94 688E
E379 7E48
E445 8141
E8F6 9839
FA55 FFE4
FA59 F86F

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,401 @@
#
# b->c only entries
#
8754 2160
8755 2161
8756 2162
8757 2163
8758 2164
8759 2165
875A 2166
875B 2167
875C 2168
875D 2169
8782 2116
8784 2121
878A 3231
8790 2252
8791 2261
8792 222B
8795 221A
8796 22A5
8797 2220
879A 2235
879B 2229
879C 222A
ED40 7E8A
ED41 891C
ED42 9348
ED43 9288
ED44 84DC
ED45 4FC9
ED46 70BB
ED47 6631
ED48 68C8
ED49 92F9
ED4A 66FB
ED4B 5F45
ED4C 4E28
ED4D 4EE1
ED4E 4EFC
ED4F 4F00
ED50 4F03
ED51 4F39
ED52 4F56
ED53 4F92
ED54 4F8A
ED55 4F9A
ED56 4F94
ED57 4FCD
ED58 5040
ED59 5022
ED5A 4FFF
ED5B 501E
ED5C 5046
ED5D 5070
ED5E 5042
ED5F 5094
ED60 50F4
ED61 50D8
ED62 514A
ED63 5164
ED64 519D
ED65 51BE
ED66 51EC
ED67 5215
ED68 529C
ED69 52A6
ED6A 52C0
ED6B 52DB
ED6C 5300
ED6D 5307
ED6E 5324
ED6F 5372
ED70 5393
ED71 53B2
ED72 53DD
ED73 FA0E
ED74 549C
ED75 548A
ED76 54A9
ED77 54FF
ED78 5586
ED79 5759
ED7A 5765
ED7B 57AC
ED7C 57C8
ED7D 57C7
ED7E FA0F
ED80 FA10
ED81 589E
ED82 58B2
ED83 590B
ED84 5953
ED85 595B
ED86 595D
ED87 5963
ED88 59A4
ED89 59BA
ED8A 5B56
ED8B 5BC0
ED8C 752F
ED8D 5BD8
ED8E 5BEC
ED8F 5C1E
ED90 5CA6
ED91 5CBA
ED92 5CF5
ED93 5D27
ED94 5D53
ED95 FA11
ED96 5D42
ED97 5D6D
ED98 5DB8
ED99 5DB9
ED9A 5DD0
ED9B 5F21
ED9C 5F34
ED9D 5F67
ED9E 5FB7
ED9F 5FDE
EDA0 605D
EDA1 6085
EDA2 608A
EDA3 60DE
EDA4 60D5
EDA5 6120
EDA6 60F2
EDA7 6111
EDA8 6137
EDA9 6130
EDAA 6198
EDAB 6213
EDAC 62A6
EDAD 63F5
EDAE 6460
EDAF 649D
EDB0 64CE
EDB1 654E
EDB2 6600
EDB3 6615
EDB4 663B
EDB5 6609
EDB6 662E
EDB7 661E
EDB8 6624
EDB9 6665
EDBA 6657
EDBB 6659
EDBC FA12
EDBD 6673
EDBE 6699
EDBF 66A0
EDC0 66B2
EDC1 66BF
EDC2 66FA
EDC3 670E
EDC4 F929
EDC5 6766
EDC6 67BB
EDC7 6852
EDC8 67C0
EDC9 6801
EDCA 6844
EDCB 68CF
EDCC FA13
EDCD 6968
EDCE FA14
EDCF 6998
EDD0 69E2
EDD1 6A30
EDD2 6A6B
EDD3 6A46
EDD4 6A73
EDD5 6A7E
EDD6 6AE2
EDD7 6AE4
EDD8 6BD6
EDD9 6C3F
EDDA 6C5C
EDDB 6C86
EDDC 6C6F
EDDD 6CDA
EDDE 6D04
EDDF 6D87
EDE0 6D6F
EDE1 6D96
EDE2 6DAC
EDE3 6DCF
EDE4 6DF8
EDE5 6DF2
EDE6 6DFC
EDE7 6E39
EDE8 6E5C
EDE9 6E27
EDEA 6E3C
EDEB 6EBF
EDEC 6F88
EDED 6FB5
EDEE 6FF5
EDEF 7005
EDF0 7007
EDF1 7028
EDF2 7085
EDF3 70AB
EDF4 710F
EDF5 7104
EDF6 715C
EDF7 7146
EDF8 7147
EDF9 FA15
EDFA 71C1
EDFB 71FE
EDFC 72B1
EE40 72BE
EE41 7324
EE42 FA16
EE43 7377
EE44 73BD
EE45 73C9
EE46 73D6
EE47 73E3
EE48 73D2
EE49 7407
EE4A 73F5
EE4B 7426
EE4C 742A
EE4D 7429
EE4E 742E
EE4F 7462
EE50 7489
EE51 749F
EE52 7501
EE53 756F
EE54 7682
EE55 769C
EE56 769E
EE57 769B
EE58 76A6
EE59 FA17
EE5A 7746
EE5B 52AF
EE5C 7821
EE5D 784E
EE5E 7864
EE5F 787A
EE60 7930
EE61 FA18
EE62 FA19
EE63 FA1A
EE64 7994
EE65 FA1B
EE66 799B
EE67 7AD1
EE68 7AE7
EE69 FA1C
EE6A 7AEB
EE6B 7B9E
EE6C FA1D
EE6D 7D48
EE6E 7D5C
EE6F 7DB7
EE70 7DA0
EE71 7DD6
EE72 7E52
EE73 7F47
EE74 7FA1
EE75 FA1E
EE76 8301
EE77 8362
EE78 837F
EE79 83C7
EE7A 83F6
EE7B 8448
EE7C 84B4
EE7D 8553
EE7E 8559
EE80 856B
EE81 FA1F
EE82 85B0
EE83 FA20
EE84 FA21
EE85 8807
EE86 88F5
EE87 8A12
EE88 8A37
EE89 8A79
EE8A 8AA7
EE8B 8ABE
EE8C 8ADF
EE8D FA22
EE8E 8AF6
EE8F 8B53
EE90 8B7F
EE91 8CF0
EE92 8CF4
EE93 8D12
EE94 8D76
EE95 FA23
EE96 8ECF
EE97 FA24
EE98 FA25
EE99 9067
EE9A 90DE
EE9B FA26
EE9C 9115
EE9D 9127
EE9E 91DA
EE9F 91D7
EEA0 91DE
EEA1 91ED
EEA2 91EE
EEA3 91E4
EEA4 91E5
EEA5 9206
EEA6 9210
EEA7 920A
EEA8 923A
EEA9 9240
EEAA 923C
EEAB 924E
EEAC 9259
EEAD 9251
EEAE 9239
EEAF 9267
EEB0 92A7
EEB1 9277
EEB2 9278
EEB3 92E7
EEB4 92D7
EEB5 92D9
EEB6 92D0
EEB7 FA27
EEB8 92D5
EEB9 92E0
EEBA 92D3
EEBB 9325
EEBC 9321
EEBD 92FB
EEBE FA28
EEBF 931E
EEC0 92FF
EEC1 931D
EEC2 9302
EEC3 9370
EEC4 9357
EEC5 93A4
EEC6 93C6
EEC7 93DE
EEC8 93F8
EEC9 9431
EECA 9445
EECB 9448
EECC 9592
EECD F9DC
EECE FA29
EECF 969D
EED0 96AF
EED1 9733
EED2 973B
EED3 9743
EED4 974D
EED5 974F
EED6 9751
EED7 9755
EED8 9857
EED9 9865
EEDA FA2A
EEDB FA2B
EEDC 9927
EEDD FA2C
EEDE 999E
EEDF 9A4E
EEE0 9AD9
EEE1 9ADC
EEE2 9B75
EEE3 9B72
EEE4 9B8F
EEE5 9BB1
EEE6 9BBB
EEE7 9C00
EEE8 9D70
EEE9 9D6B
EEEA FA2D
EEEB 9E19
EEEC 9ED1
EEEF 2170
EEF0 2171
EEF1 2172
EEF2 2173
EEF3 2174
EEF4 2175
EEF5 2176
EEF6 2177
EEF7 2178
EEF8 2179
EEF9 FFE2
EEFA 00A6
EEFB FF07
EEFC FF02
FA54 FFE2
FA5B 2235

@ -0,0 +1,188 @@
8C40 4E00
8C41 4E59
8C47 4E8C
8C48 4EBA
8C49 513F
8C4A 5165
8C4B 516B
8C4C 51E0
8C4D 5200
8C4F 529B
8C50 5315
8C51 5341
8C52 535C
8C53 53C8
8C66 53E3
8C67 571F
8C68 58EB
8C69 5915
8C6A 5927
8C6B 5973
8C6C 5B50
8C6F 5BF8
8C70 5C0F
8C71 5C22
8C72 5C38
8C73 5C71
8C75 5DE5
8C76 5DF1
8C79 5DFE
8C7A 5E72
8C7B 5EFE
8C7C 5F0B
8C7D 5F13
8CA9 5345
8CBE 5FC3
8CBF 6208
8CC0 6236
8CC1 624B
8CC3 652F
8CC4 6587
8CC5 6597
8CC6 65A4
8CC7 65B9
8CC8 65E5
8CC9 66F0
8CCA 6708
8CCB 6728
8CCC 6B20
8CCD 6B62
8CCE 6B79
8CCF 6BCB
8CD0 6BD4
8CD1 6BDB
8CD2 6C0F
8CD3 6C34
8CD4 706B
8CD5 722A
8CD6 7236
8CD7 723B
8CD8 7247
8CD9 7259
8CDA 725B
8CDB 72AC
8D88 7384
8D89 7389
8D8A 74DC
8D8B 74E6
8D8C 7518
8D8D 751F
8D8E 7528
8D90 7530
8D94 758B
8D95 767D
8D96 76AE
8D97 76BF
8D98 76EE
8D99 77DB
8D9A 77E2
8D9B 77F3
8D9C 793A
8D9D 79BE
8D9E 7A74
8D9F 7ACB
8E6B 7AF9
8E6C 7C73
8E6D 7CF8
8E6E 7F36
8E6F 7F8A
8E70 7FBD
8E71 8001
8E73 800C
8E74 8012
8E75 8033
8E76 807F
8E77 8089
8E7A 81E3
8E7B 81EA
8E7C 81F3
8E7D 81FC
8E7E 820C
8E80 821B
8E81 821F
8E82 826E
8E83 8272
8E85 866B
8E86 8840
8E87 884C
8E88 8863
8FC2 898B
8FC3 89D2
8FC4 8A00
8FC5 8C37
8FC6 8C46
8FC7 8C55
8FC8 8C9D
8FC9 8D64
8FCA 8D70
8FCB 8DB3
8FCC 8EAB
8FCD 8ECA
8FCE 8F9B
8FCF 8FB0
8FD5 9091
8FDA 9149
8FDB 91C6
8FDC 91CC
91D8 91D1
91D9 9577
91DA 9580
91DB 961C
91E1 96B9
91E2 96E8
91E3 9752
91E4 975E
93F1 9762
93F2 9769
93F3 97CB
93F4 97ED
93F5 97F3
93F6 9801
93F7 98A8
93F8 98DB
93F9 98DF
93FA 9996
93FB 9999
968B 99AC
968C 9AA8
968D 9AD8
968E 9B25
968F 9B32
9690 9B3C
9942 9B5A
9943 9CE5
9944 9E75
9945 9E7F
9946 9EA5
9947 9EBB
9BA5 9EC3
9BA6 9ECD
9BA7 9ED1
9DED 9F0E
9DEE 9F13
9DEF 9F20
9FF9 9F3B
9FFA 9F4A
A24E 9F52
A3BC 9F8D
A3BD 9F9C
A942 51F5
A943 531A
A944 5382
A949 56D7
A94B 5C6E
A94C 5F73
A95F 6BB3
A961 6C14
A962 723F
A987 79B8
A9E7 7F51
A9E8 8278
A9ED 864D
A9EE 897E
AB44 8C78
B26C 9ADF
B26D 9B2F
B975 9EF9
BCF5 9EFD
C962 9FA0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,188 @@
A440 4E00
A441 4E59
A447 4E8C
A448 4EBA
A449 513F
A44A 5165
A44B 516B
A44C 51E0
A44D 5200
A44F 529B
A450 5315
A451 5341
A452 535C
A453 53C8
A466 53E3
A467 571F
A468 58EB
A469 5915
A46A 5927
A46B 5973
A46C 5B50
A46F 5BF8
A470 5C0F
A471 5C22
A472 5C38
A473 5C71
A475 5DE5
A476 5DF1
A479 5DFE
A47A 5E72
A47B 5EFE
A47C 5F0B
A47D 5F13
A4CA 5345
A4DF 5FC3
A4E0 6208
A4E1 6236
A4E2 624B
A4E4 652F
A4E5 6587
A4E6 6597
A4E7 65A4
A4E8 65B9
A4E9 65E5
A4EA 66F0
A4EB 6708
A4EC 6728
A4ED 6B20
A4EE 6B62
A4EF 6B79
A4F0 6BCB
A4F1 6BD4
A4F2 6BDB
A4F3 6C0F
A4F4 6C34
A4F5 706B
A4F6 722A
A4F7 7236
A4F8 723B
A4F9 7247
A4FA 7259
A4FB 725B
A4FC 72AC
A5C8 7384
A5C9 7389
A5CA 74DC
A5CB 74E6
A5CC 7518
A5CD 751F
A5CE 7528
A5D0 7530
A5D4 758B
A5D5 767D
A5D6 76AE
A5D7 76BF
A5D8 76EE
A5D9 77DB
A5DA 77E2
A5DB 77F3
A5DC 793A
A5DD 79BE
A5DE 7A74
A5DF 7ACB
A6CB 7AF9
A6CC 7C73
A6CD 7CF8
A6CE 7F36
A6CF 7F8A
A6D0 7FBD
A6D1 8001
A6D3 800C
A6D4 8012
A6D5 8033
A6D6 807F
A6D7 8089
A6DA 81E3
A6DB 81EA
A6DC 81F3
A6DD 81FC
A6DE 820C
A6DF 821B
A6E0 821F
A6E1 826E
A6E2 8272
A6E4 866B
A6E5 8840
A6E6 884C
A6E7 8863
A8A3 898B
A8A4 89D2
A8A5 8A00
A8A6 8C37
A8A7 8C46
A8A8 8C55
A8A9 8C9D
A8AA 8D64
A8AB 8D70
A8AC 8DB3
A8AD 8EAB
A8AE 8ECA
A8AF 8F9B
A8B0 8FB0
A8B6 9091
A8BB 9149
A8BC 91C6
A8BD 91CC
AAF7 91D1
AAF8 9577
AAF9 9580
AAFA 961C
AB41 96B9
AB42 96E8
AB43 9752
AB44 975E
ADB1 9762
ADB2 9769
ADB3 97CB
ADB4 97ED
ADB5 97F3
ADB6 9801
ADB7 98A8
ADB8 98DB
ADB9 98DF
ADBA 9996
ADBB 9999
B0A8 99AC
B0A9 9AA8
B0AA 9AD8
B0AB 9B25
B0AC 9B32
B0AD 9B3C
B3BD 9B5A
B3BE 9CE5
B3BF 9E75
B3C0 9E7F
B3C1 9EA5
B3C2 9EBB
B6C0 9EC3
B6C1 9ECD
B6C2 9ED1
B9A9 9F0E
B9AA 9F13
B9AB 9F20
BBF3 9F3B
BBF4 9F4A
BEA6 9F52
C073 9F8D
C074 9F9C
C942 51F5
C943 531A
C944 5382
C949 56D7
C94B 5C6E
C94C 5F73
C95F 6BB3
C961 6C14
C962 723F
C9A8 79B8
CA49 7F51
CA4A 8278
CA4F 864D
CA50 897E
CBA4 8C78
D449 9ADF
D44A 9B2F
DCB0 9EF9
E0EF 9EFD
EFB6 9FA0

File diff suppressed because it is too large Load Diff

@ -0,0 +1,18 @@
A1A4 00B7
A1A9 00AD
A1AA 2015
A1AD 223C
A2A6 FF5E
A2C1 2299
A3DC 20A9
#
# see .map file for the info regarding following 3 entries
#
a1aa 6950
a1a9 84f1
a1ad cf7f

File diff suppressed because it is too large Load Diff

@ -0,0 +1,16 @@
#
#clzName csName hisName dbtype pkg ascii b1min b1max b2min b2max
#
IBM1381 x-IBM1381 Cp1381 basic sun.nio.cs.ext true 0x8c 0xf7 0xa1 0xfe
IBM1383 x-IBM1383 Cp1383 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe
IBM930 x-IBM930 Cp930 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM933 x-IBM933 Cp933 ebcdic sun.nio.cs.ext false 0x40 0xdd 0x40 0xfe
IBM935 x-IBM935 Cp935 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM937 x-IBM937 Cp937 ebcdic sun.nio.cs.ext false 0x40 0xe2 0x40 0xfe
IBM939 x-IBM939 Cp939 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM942 x-IBM942 Cp942 basic sun.nio.cs.ext false 0x81 0xfc 0x40 0xfc
IBM943 x-IBM943 Cp943 basic sun.nio.cs.ext false 0x81 0xfc 0x40 0xfc
IBM948 x-IBM948 Cp948 basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfc
IBM949 x-IBM949 Cp949 basic sun.nio.cs.ext false 0x8f 0xfe 0xa1 0xfe
IBM950 x-IBM950 Cp950 basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfe
IBM970 x-IBM970 Cp970 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe

@ -0,0 +1,285 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package build.tools.charsetmapping;
import java.io.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Formatter;
import java.util.regex.*;
import java.nio.charset.*;
import static build.tools.charsetmapping.CharsetMapping.*;
public class GenerateDBCS {
// pattern used by this class to read in mapping table
static Pattern mPattern = Pattern.compile("(\\p{XDigit}++)\\s++(\\p{XDigit}++)(\\s++#.*)?");
public static void genDBCS(String args[]) throws Exception {
Scanner s = new Scanner(new File(args[0], args[2]));
while (s.hasNextLine()) {
String line = s.nextLine();
if (line.startsWith("#") || line.length() == 0)
continue;
String[] fields = line.split("\\s+");
if (fields.length < 10) {
System.err.println("Misconfiged sbcs line <" + line + ">?");
continue;
}
String clzName = fields[0];
String csName = fields[1];
String hisName = ("null".equals(fields[2]))?null:fields[2];
String type = fields[3].toUpperCase();
if ("BASIC".equals(type))
type = "";
else
type = "_" + type;
String pkgName = fields[4];
boolean isASCII = Boolean.valueOf(fields[5]);
int b1Min = toInteger(fields[6]);
int b1Max = toInteger(fields[7]);
int b2Min = toInteger(fields[8]);
int b2Max = toInteger(fields[9]);
System.out.printf("%s,%s,%s,%b,%s%n", clzName, csName, hisName, isASCII, pkgName);
genClass(args[0], args[1], "DoubleByte-X.java",
clzName, csName, hisName, pkgName,
isASCII, type,
b1Min, b1Max, b2Min, b2Max);
}
}
private static int toInteger(String s) {
if (s.startsWith("0x") || s.startsWith("0X"))
return Integer.valueOf(s.substring(2), 16);
else
return Integer.valueOf(s);
}
private static void outString(Formatter out,
char[] cc, int off, int end,
String closure)
{
while (off < end) {
out.format(" \"");
for (int j = 0; j < 8; j++) {
if (off == end)
break;
char c = cc[off++];
switch (c) {
case '\b':
out.format("\\b"); break;
case '\t':
out.format("\\t"); break;
case '\n':
out.format("\\n"); break;
case '\f':
out.format("\\f"); break;
case '\r':
out.format("\\r"); break;
case '\"':
out.format("\\\""); break;
case '\'':
out.format("\\'"); break;
case '\\':
out.format("\\\\"); break;
default:
out.format("\\u%04X", c & 0xffff);
}
}
if (off == end)
out.format("\" %s%n", closure);
else
out.format("\" + %n");
}
}
private static void outString(Formatter out,
char[] db,
int b1,
int b2Min, int b2Max,
String closure)
{
char[] cc = new char[b2Max - b2Min + 1];
int off = 0;
for (int b2 = b2Min; b2 <= b2Max; b2++) {
cc[off++] = db[(b1 << 8) | b2];
}
outString(out, cc, 0, cc.length, closure);
}
private static void genClass(String srcDir, String dstDir, String template,
String clzName,
String csName,
String hisName,
String pkgName,
boolean isASCII,
String type,
int b1Min, int b1Max,
int b2Min, int b2Max)
throws Exception
{
StringBuilder b2cSB = new StringBuilder();
StringBuilder b2cNRSB = new StringBuilder();
StringBuilder c2bNRSB = new StringBuilder();
char[] db = new char[0x10000];
char[] c2bIndex = new char[0x100];
int c2bOff = 0x100; // first 0x100 for unmappable segs
Arrays.fill(db, UNMAPPABLE_DECODING);
Arrays.fill(c2bIndex, UNMAPPABLE_DECODING);
char[] b2cIndex = new char[0x100];
Arrays.fill(b2cIndex, UNMAPPABLE_DECODING);
// (1)read in .map to parse all b->c entries
FileInputStream in = new FileInputStream(new File(srcDir, clzName + ".map"));
Parser p = new Parser(in, mPattern);
Entry e = null;
while ((e = p.next()) != null) {
db[e.bs] = (char)e.cp;
if (e.bs > 0x100 && // db
b2cIndex[e.bs>>8] == UNMAPPABLE_DECODING) {
b2cIndex[e.bs>>8] = 1;
}
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
c2bOff += 0x100;
c2bIndex[e.cp>>8] = 1;
}
}
Formatter fm = new Formatter(b2cSB);
fm.format("%n static final String b2cSBStr =%n");
outString(fm, db, 0x00, 0x100, ";");
fm.format("%n static final String[] b2cStr = {%n");
for (int i = 0; i < 0x100; i++) {
if (b2cIndex[i] == UNMAPPABLE_DECODING) {
fm.format(" null,%n"); //unmappable segments
} else {
outString(fm, db, i, b2Min, b2Max, ",");
}
}
fm.format(" };%n");
fm.close();
// (2)now parse the .nr file which includes "b->c" non-roundtrip entries
File f = new File(srcDir, clzName + ".nr");
if (f.exists()) {
StringBuilder sb = new StringBuilder();
in = new FileInputStream(f);
p = new Parser(in, mPattern);
e = null;
while ((e = p.next()) != null) {
// A <b,c> pair
sb.append((char)e.bs);
sb.append((char)e.cp);
}
char[] nr = sb.toString().toCharArray();
fm = new Formatter(b2cNRSB);
fm.format("String b2cNR =%n");
outString(fm, nr, 0, nr.length, ";");
fm.close();
} else {
b2cNRSB.append("String b2cNR = null;");
}
// (3)finally the .c2b file which includes c->b non-roundtrip entries
f = new File(srcDir, clzName + ".c2b");
if (f.exists()) {
StringBuilder sb = new StringBuilder();
in = new FileInputStream(f);
p = new Parser(in, mPattern);
e = null;
while ((e = p.next()) != null) {
// A <b,c> pair
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
c2bOff += 0x100;
c2bIndex[e.cp>>8] = 1;
}
sb.append((char)e.bs);
sb.append((char)e.cp);
}
char[] nr = sb.toString().toCharArray();
fm = new Formatter(c2bNRSB);
fm.format("String c2bNR =%n");
outString(fm, nr, 0, nr.length, ";");
fm.close();
} else {
c2bNRSB.append("String c2bNR = null;");
}
// (4)it's time to generate the source file
String b2c = b2cSB.toString();
String b2cNR = b2cNRSB.toString();
String c2bNR = c2bNRSB.toString();
Scanner s = new Scanner(new File(srcDir, template));
PrintStream out = new PrintStream(new FileOutputStream(
new File(dstDir, clzName + ".java")));
if (hisName == null)
hisName = "";
while (s.hasNextLine()) {
String line = s.nextLine();
if (line.indexOf("$") == -1) {
out.println(line);
continue;
}
line = line.replace("$PACKAGE$" , pkgName)
.replace("$IMPLEMENTS$", (hisName == null)?
"" : "implements HistoricallyNamedCharset")
.replace("$NAME_CLZ$", clzName)
.replace("$NAME_ALIASES$",
"sun.nio.cs".equals(pkgName) ?
"StandardCharsets.aliases_" + clzName :
"ExtendedCharsets.aliasesFor(\"" + csName + "\")")
.replace("$NAME_CS$" , csName)
.replace("$CONTAINS$", isASCII ?
" return ((cs.name().equals(\"US-ASCII\")) || (cs instanceof "
+ clzName + "));":
" return (cs instanceof " + clzName + ");")
.replace("$HISTORICALNAME$",
(hisName == null)? "" :
" public String historicalName() { return \"" + hisName + "\"; }")
.replace("$DECTYPE$", type)
.replace("$ENCTYPE$", type)
.replace("$B1MIN$" , "0x" + Integer.toString(b1Min, 16))
.replace("$B1MAX$" , "0x" + Integer.toString(b1Max, 16))
.replace("$B2MIN$" , "0x" + Integer.toString(b2Min, 16))
.replace("$B2MAX$" , "0x" + Integer.toString(b2Max, 16))
.replace("$B2C$", b2c)
.replace("$C2BLENGTH$", "0x" + Integer.toString(c2bOff, 16))
.replace("$NONROUNDTRIP_B2C$", b2cNR)
.replace("$NONROUNDTRIP_C2B$", c2bNR);
out.println(line);
}
out.close();
}
}

@ -37,6 +37,9 @@ public class Main {
}
if ("sbcs".equals(args[2]) || "extsbcs".equals(args[2])) {
GenerateSBCS.genSBCS(args);
} else if ("dbcs".equals(args[2])) {
GenerateDBCS.genDBCS(args);
} else if ("euctw".equals(args[2])) {
if (args.length != 4) {
System.out.println("Usage: java -jar charsetmapping.jar srcDir dstDir euctw copyrightSrc");

@ -24,70 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM1381;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Cp1381 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp1381
extends ByteToCharDBCS_ASCII
public class ByteToCharCp1381 extends ByteToCharDBCS_ASCII {
{
// Return the character set id
public String getCharacterEncoding() {
return "Cp1381";
}
private final static IBM1381 nioCoder = new IBM1381();
// Return the character set id
public String getCharacterEncoding()
{
return "Cp1381";
}
private static final boolean leadByte[] = {
false, false, false, false, false, false, false, false, // 00 - 07
false, false, false, false, false, false, false, false, // 08 - 0F
false, false, false, false, false, false, false, false, // 10 - 17
false, false, false, false, false, false, false, false, // 18 - 1F
false, false, false, false, false, false, false, false, // 20 - 27
false, false, false, false, false, false, false, false, // 28 - 2F
false, false, false, false, false, false, false, false, // 30 - 37
false, false, false, false, false, false, false, false, // 38 - 3F
false, false, false, false, false, false, false, false, // 40 - 47
false, false, false, false, false, false, false, false, // 48 - 4F
false, false, false, false, false, false, false, false, // 50 - 57
false, false, false, false, false, false, false, false, // 58 - 5F
false, false, false, false, false, false, false, false, // 60 - 67
false, false, false, false, false, false, false, false, // 68 - 6F
false, false, false, false, false, false, false, false, // 70 - 77
false, false, false, false, false, false, false, false, // 78 - 7F
false, false, false, false, false, false, false, false, // 80 - 87
false, false, false, false, true, true, true, true, // 88 - 8F
true, true, true, true, true, true, true, true, // 90 - 97
true, true, true, true, true, true, true, true, // 98 - 9F
true, true, true, true, true, true, true, true, // A0 - A7
true, true, false, false, false, false, false, false, // A8 - AF
true, true, true, true, true, true, true, true, // B0 - B7
true, true, true, true, true, true, true, true, // B8 - BF
true, true, true, true, true, true, true, true, // C0 - C7
true, true, true, true, true, true, true, true, // C8 - CF
true, true, true, true, true, true, true, true, // D0 - D7
true, true, true, true, true, true, true, true, // D8 - DF
true, true, true, true, true, true, true, true, // E0 - E7
true, true, true, true, true, true, true, true, // E8 - EF
true, true, true, true, true, true, true, true, // F0 - F7
false, false, false, false, false, false, false, false, // F8 - FF
};
public ByteToCharCp1381() {
super();
super.mask1 = 0xFFE0;
super.mask2 = 0x001F;
super.shift = 5;
super.leadByte = this.leadByte;
super.singleByteToChar = nioCoder.getDecoderSingleByteMappings();
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp1381() {
super((DoubleByte.Decoder)new IBM1381().newDecoder());
}
}

@ -24,31 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM1383;
import sun.nio.cs.ext.*;
/**
* A table to convert Cp1383 to Unicode
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp1383
extends ByteToCharEUC
public class ByteToCharCp1383 extends ByteToCharEUC2 {
{
// Return the character set id
public String getCharacterEncoding() {
return "Cp1383";
}
private final static IBM1383 nioCoder = new IBM1383();
// Return the character set id
public String getCharacterEncoding()
{
return "Cp1383";
}
public ByteToCharCp1383()
{
// Set the correct mapping table
super();
super.byteToCharTable = nioCoder.getDecoderSingleByteMappings();
super.mappingTableG1 = nioCoder.getDecoderMappingTableG1();
}
public ByteToCharCp1383() {
super((DoubleByte.Decoder)new IBM1383().newDecoder());
}
}

@ -24,131 +24,15 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM933;
import sun.nio.cs.ext.*;
public class ByteToCharCp834 extends ByteToCharDBCS_ASCII {
public class ByteToCharCp834 extends ByteToCharDBCS_ONLY_EBCDIC {
public String getCharacterEncoding() {
return "Cp834";
}
public ByteToCharCp834() {
super();
super.mask1 = 0xFFF0;
super.mask2 = 0x000F;
super.shift = 4;
super.index1 = IBM933.getDecoderIndex1();
super.index2 = IBM933.getDecoderIndex2();
}
}
abstract class ByteToCharDBCS_ONLY_EBCDIC extends ByteToCharConverter {
private boolean savedBytePresent;
private byte savedByte;
protected short index1[];
protected String index2;
protected int mask1;
protected int mask2;
protected int shift;
public ByteToCharDBCS_ONLY_EBCDIC() {
super();
savedBytePresent = false;
}
public int flush(char [] output, int outStart, int outEnd)
throws MalformedInputException
{
if (savedBytePresent) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
reset();
return 0;
}
/**
* Character conversion
*/
public int convert(byte[] input, int inOff, int inEnd,
char[] output, int outOff, int outEnd)
throws UnknownCharacterException, MalformedInputException,
ConversionBufferFullException
{
int inputSize;
char outputChar = '\uFFFD';
charOff = outOff;
byteOff = inOff;
while(byteOff < inEnd) {
int byte1, byte2;
int v;
if (!savedBytePresent) {
byte1 = input[byteOff] & 0xff;
inputSize = 1;
} else {
byte1 = savedByte;
savedBytePresent = false;
inputSize = 0;
}
// valid range of 1st bytes
if (byte1 < 0x40 || byte1 > 0xfe) {
badInputLength = 1;
throw new MalformedInputException();
}
if (byteOff + inputSize >= inEnd) {
// We have been split in the middle if a character
// save the first byte for next time around
savedByte = (byte)byte1;
savedBytePresent = true;
byteOff += inputSize;
break;
}
byte2 = input[byteOff+inputSize] & 0xff;
inputSize++;
// validate the pair of bytes
if ((byte1 != 0x40 || byte2 != 0x40) &&
(byte2 < 0x41 || byte2 > 0xfe)) {
badInputLength = 2;
throw new MalformedInputException();
}
// Lookup in the two level index
v = byte1 * 256 + byte2;
outputChar = index2.charAt(index1[((v & mask1) >> shift)]
+ (v & mask2));
if (outputChar == '\uFFFD') {
if (subMode)
outputChar = subChars[0];
else {
badInputLength = inputSize;
throw new UnknownCharacterException();
}
}
if (charOff >= outEnd)
throw new ConversionBufferFullException();
output[charOff++] = outputChar;
byteOff += inputSize;
}
return charOff - outOff;
}
/**
* Resets the converter.
*/
public void reset() {
charOff = byteOff = 0;
savedBytePresent = false;
super((DoubleByte.Decoder)new IBM834().newDecoder());
}
}

@ -24,32 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM930;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Cp930 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp930
extends ByteToCharDBCS_EBCDIC
public class ByteToCharCp930 extends ByteToCharDBCS_EBCDIC {
{
private static IBM930 nioCoder = new IBM930();
// Return the character set id
// Return the character set id
public String getCharacterEncoding() {
return "Cp930";
}
public String getCharacterEncoding()
{
return "Cp930";
}
public ByteToCharCp930() {
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.singleByteToChar = nioCoder.getDecoderSingleByteMappings();
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp930() {
super((DoubleByte.Decoder)new IBM930().newDecoder());
}
}

@ -24,33 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM933;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Cp933 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp933
extends ByteToCharDBCS_EBCDIC
public class ByteToCharCp933 extends ByteToCharDBCS_EBCDIC {
{
private final static IBM933 nioCoder = new IBM933();
// Return the character set id
public String getCharacterEncoding() {
return "Cp933";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp933";
}
public ByteToCharCp933() {
super();
super.mask1 = 0xFFF0;
super.mask2 = 0x000F;
super.shift = 4;
super.singleByteToChar = nioCoder.getDecoderSingleByteMappings();
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp933() {
super((DoubleByte.Decoder)new IBM933().newDecoder());
}
}

@ -24,33 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM935;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Cp935 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp935
extends ByteToCharDBCS_EBCDIC
public class ByteToCharCp935 extends ByteToCharDBCS_EBCDIC {
{
private static IBM935 nioCoder = new IBM935();
// Return the character set id
public String getCharacterEncoding() {
return "Cp935";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp935";
}
public ByteToCharCp935() {
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.singleByteToChar = nioCoder.getDecoderByteToCharMappings();
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp935() {
super((DoubleByte.Decoder)new IBM935().newDecoder());
}
}

@ -23,33 +23,17 @@
* have any questions.
*/
package sun.io;
import sun.nio.cs.ext.IBM937;
/**
* Tables and data to convert Cp937 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp937
extends ByteToCharDBCS_EBCDIC
import sun.nio.cs.ext.*;
{
private final static IBM937 nioCoder = new IBM937();
public class ByteToCharCp937 extends ByteToCharDBCS_EBCDIC {
// Return the character set id
public String getCharacterEncoding()
{
return "Cp937";
}
// Return the character set id
public String getCharacterEncoding() {
return "Cp937";
}
public ByteToCharCp937() {
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.singleByteToChar = nioCoder.getDecoderByteToCharMappings();
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp937() {
super((DoubleByte.Decoder)new IBM937().newDecoder());
}
}

@ -24,32 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM939;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Cp939 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp939
extends ByteToCharDBCS_EBCDIC
public class ByteToCharCp939 extends ByteToCharDBCS_EBCDIC {
{
private final static IBM939 nioCoder = new IBM939();
// Return the character set id
public String getCharacterEncoding() {
return "Cp939";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp939";
}
public ByteToCharCp939() {
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.singleByteToChar = nioCoder.getDecoderByteToCharMappings();
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp939() {
super((DoubleByte.Decoder)new IBM939().newDecoder());
}
}

@ -24,105 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM942;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Cp942 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp942
extends ByteToCharDBCS_ASCII
public class ByteToCharCp942 extends ByteToCharDBCS_ASCII {
{
private static IBM942 nioCoder = new IBM942();
// Return the character set id
public String getCharacterEncoding() {
return "Cp942";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp942";
}
private static final boolean leadByte[] = {
false, false, false, false, false, false, false, false, // 00 - 07
false, false, false, false, false, false, false, false, // 08 - 0F
false, false, false, false, false, false, false, false, // 10 - 17
false, false, false, false, false, false, false, false, // 18 - 1F
false, false, false, false, false, false, false, false, // 20 - 27
false, false, false, false, false, false, false, false, // 28 - 2F
false, false, false, false, false, false, false, false, // 30 - 37
false, false, false, false, false, false, false, false, // 38 - 3F
false, false, false, false, false, false, false, false, // 40 - 47
false, false, false, false, false, false, false, false, // 48 - 4F
false, false, false, false, false, false, false, false, // 50 - 57
false, false, false, false, false, false, false, false, // 58 - 5F
false, false, false, false, false, false, false, false, // 60 - 67
false, false, false, false, false, false, false, false, // 68 - 6F
false, false, false, false, false, false, false, false, // 70 - 77
false, false, false, false, false, false, false, false, // 78 - 7F
false, true, true, true, true, false, false, false, // 80 - 87
true, true, true, true, true, true, true, true, // 88 - 8F
true, true, true, true, true, true, true, true, // 90 - 97
true, true, true, true, true, true, true, true, // 98 - 9F
false, false, false, false, false, false, false, false, // A0 - A7
false, false, false, false, false, false, false, false, // A8 - AF
false, false, false, false, false, false, false, false, // B0 - B7
false, false, false, false, false, false, false, false, // B8 - BF
false, false, false, false, false, false, false, false, // C0 - C7
false, false, false, false, false, false, false, false, // C8 - CF
false, false, false, false, false, false, false, false, // D0 - D7
false, false, false, false, false, false, false, false, // D8 - DF
true, true, true, true, true, true, true, true, // E0 - E7
true, true, true, false, false, false, false, false, // E8 - EF
true, true, true, true, true, true, true, true, // F0 - F7
true, true, true, true, true, false, false, false, // F8 - FF
};
private static final String singleByteToChar =
"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007" +
"\u0008\u0009\n\u000B\u000C\r\u000E\u000F" +
"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017" +
"\u0018\u0019\u001C\u001B\u007F\u001D\u001E\u001F" +
"\u0020\u0021\"\u0023\u0024\u0025\u0026\u0027" +
"\u0028\u0029\u002A\u002B\u002C\u002D\u002E\u002F" +
"\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037" +
"\u0038\u0039\u003A\u003B\u003C\u003D\u003E\u003F" +
"\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047" +
"\u0048\u0049\u004A\u004B\u004C\u004D\u004E\u004F" +
"\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057" +
"\u0058\u0059\u005A\u005B\u00A5\u005D\u005E\u005F" +
"\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067" +
"\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F" +
"\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077" +
"\u0078\u0079\u007A\u007B\u007C\u007D\u203E\u001A" +
"\u00A2\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\u00A3\uFF61\uFF62\uFF63\uFF64\uFF65\uFF66\uFF67" +
"\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F" +
"\uFF70\uFF71\uFF72\uFF73\uFF74\uFF75\uFF76\uFF77" +
"\uFF78\uFF79\uFF7A\uFF7B\uFF7C\uFF7D\uFF7E\uFF7F" +
"\uFF80\uFF81\uFF82\uFF83\uFF84\uFF85\uFF86\uFF87" +
"\uFF88\uFF89\uFF8A\uFF8B\uFF8C\uFF8D\uFF8E\uFF8F" +
"\uFF90\uFF91\uFF92\uFF93\uFF94\uFF95\uFF96\uFF97" +
"\uFF98\uFF99\uFF9A\uFF9B\uFF9C\uFF9D\uFF9E\uFF9F" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u00AC\\\u007E"
;
public ByteToCharCp942() {
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.leadByte = this.leadByte;
super.singleByteToChar = this.singleByteToChar;
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp942() {
super((DoubleByte.Decoder)new IBM942().newDecoder());
}
}

@ -25,44 +25,16 @@
package sun.io;
import sun.io.*;
import sun.nio.cs.ext.*;
public class ByteToCharCp942C extends ByteToCharDBCS_ASCII {
protected static final String singleByteToChar;
protected static final boolean leadByte[];
protected static final short index1[];
protected static final String index2;
protected static final int mask1;
protected static final int mask2;
protected static final int shift;
static {
ByteToCharDBCS_ASCII y = new ByteToCharCp942();
mask1 = y.mask1;
mask2 = y.mask2;
shift = y.shift;
leadByte = y.leadByte;
index1 = y.index1;
index2 = y.index2;
// Return the character set id
public String getCharacterEncoding() {
return "Cp942C";
}
/* Fix converter to pass through 0x00 to 0x7f unchanged to U+0000 to U+007F */
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
singleByteToChar = indexs + y.singleByteToChar.substring(indexs.length());
}
public String getCharacterEncoding() {
return "Cp942C";
}
ByteToCharCp942C() {
super();
super.mask1 = mask1;
super.mask2 = mask2;
super.shift = shift;
super.leadByte = leadByte;
super.singleByteToChar = singleByteToChar;
super.index1 = index1;
super.index2 = index2;
}
public ByteToCharCp942C() {
super((DoubleByte.Decoder)new IBM942C().newDecoder());
}
}

@ -22,102 +22,19 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
// Table from Cp943 to Unicode
package sun.io;
import sun.nio.cs.ext.IBM943;
/**
* Tables and data to convert Cp943 to Unicode
*
* @author BuildTable tool
*/
import sun.nio.cs.ext.*;
public class ByteToCharCp943 extends ByteToCharDBCS_ASCII {
private static IBM943 nioCoder = new IBM943();
// Return the character set id
public String getCharacterEncoding() {
return "Cp943";
}
public ByteToCharCp943() {
super();
super.leadByte = this.leadByte;
super.singleByteToChar = this.singleByteToChar;
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super((DoubleByte.Decoder)new IBM943().newDecoder());
}
private static final boolean leadByte[] = {
false, false, false, false, false, false, false, false, // 00 - 07
false, false, false, false, false, false, false, false, // 08 - 0F
false, false, false, false, false, false, false, false, // 10 - 17
false, false, false, false, false, false, false, false, // 18 - 1F
false, false, false, false, false, false, false, false, // 20 - 27
false, false, false, false, false, false, false, false, // 28 - 2F
false, false, false, false, false, false, false, false, // 30 - 37
false, false, false, false, false, false, false, false, // 38 - 3F
false, false, false, false, false, false, false, false, // 40 - 47
false, false, false, false, false, false, false, false, // 48 - 4F
false, false, false, false, false, false, false, false, // 50 - 57
false, false, false, false, false, false, false, false, // 58 - 5F
false, false, false, false, false, false, false, false, // 60 - 67
false, false, false, false, false, false, false, false, // 68 - 6F
false, false, false, false, false, false, false, false, // 70 - 77
false, false, false, false, false, false, false, false, // 78 - 7F
false, true, true, true, true, false, false, true, // 80 - 87
true, true, true, true, true, true, true, true, // 88 - 8F
true, true, true, true, true, true, true, true, // 90 - 97
true, true, true, true, true, true, true, true, // 98 - 9F
false, false, false, false, false, false, false, false, // A0 - A7
false, false, false, false, false, false, false, false, // A8 - AF
false, false, false, false, false, false, false, false, // B0 - B7
false, false, false, false, false, false, false, false, // B8 - BF
false, false, false, false, false, false, false, false, // C0 - C7
false, false, false, false, false, false, false, false, // C8 - CF
false, false, false, false, false, false, false, false, // D0 - D7
false, false, false, false, false, false, false, false, // D8 - DF
true, true, true, true, true, true, true, true, // E0 - E7
true, true, true, true, true, true, true, false, // E8 - EF
true, true, true, true, true, true, true, true, // F0 - F7
true, true, true, true, true, false, false, false, // F8 - FF
};
static final String singleByteToChar =
"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007"+ // 0-7
"\u0008\u0009\n\u000B\u000C\r\u000E\u000F"+ // 8-F
"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017"+ // 10-17
"\u0018\u0019\u001C\u001B\u007F\u001D\u001E\u001F"+ // 18-1F
"\u0020\u0021\"\u0023\u0024\u0025\u0026\u0027"+ // 20-27
"\u0028\u0029\u002A\u002B\u002C\u002D\u002E\u002F"+ // 28-2F
"\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037"+ // 30-37
"\u0038\u0039\u003A\u003B\u003C\u003D\u003E\u003F"+ // 38-3F
"\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047"+ // 40-47
"\u0048\u0049\u004A\u004B\u004C\u004D\u004E\u004F"+ // 48-4F
"\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057"+ // 50-57
"\u0058\u0059\u005A\u005B\u00A5\u005D\u005E\u005F"+ // 58-5F
"\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067"+ // 60-67
"\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F"+ // 68-6F
"\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077"+ // 70-77
"\u0078\u0079\u007A\u007B\u007C\u007D\u203E\u001A"+ // 78-7F
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // 80-87
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // 88-8F
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // 90-97
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // 98-9F
"\uFFFD\uFF61\uFF62\uFF63\uFF64\uFF65\uFF66\uFF67"+ // A0-A7
"\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F"+ // A8-AF
"\uFF70\uFF71\uFF72\uFF73\uFF74\uFF75\uFF76\uFF77"+ // B0-B7
"\uFF78\uFF79\uFF7A\uFF7B\uFF7C\uFF7D\uFF7E\uFF7F"+ // B8-BF
"\uFF80\uFF81\uFF82\uFF83\uFF84\uFF85\uFF86\uFF87"+ // C0-C7
"\uFF88\uFF89\uFF8A\uFF8B\uFF8C\uFF8D\uFF8E\uFF8F"+ // C8-CF
"\uFF90\uFF91\uFF92\uFF93\uFF94\uFF95\uFF96\uFF97"+ // D0-D7
"\uFF98\uFF99\uFF9A\uFF9B\uFF9C\uFF9D\uFF9E\uFF9F"+ // D8-DF
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // E0-E7
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // E8-EF
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // F0-F7
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"; // F8-FF
}

@ -25,44 +25,16 @@
package sun.io;
import sun.io.*;
import sun.nio.cs.ext.*;
public class ByteToCharCp943C extends ByteToCharDBCS_ASCII {
protected static final String singleByteToChar;
protected static final boolean leadByte[];
protected static final short index1[];
protected static final String index2;
protected static final int mask1;
protected static final int mask2;
protected static final int shift;
static {
ByteToCharDBCS_ASCII y = new ByteToCharCp943();
mask1 = y.mask1;
mask2 = y.mask2;
shift = y.shift;
leadByte = y.leadByte;
index1 = y.index1;
index2 = y.index2;
// Return the character set id
public String getCharacterEncoding() {
return "Cp943C";
}
/* Fix converter to pass through 0x00 to 0x7f unchanged to U+0000 to U+007F */
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
singleByteToChar = indexs + y.singleByteToChar.substring(indexs.length());
}
public String getCharacterEncoding() {
return "Cp943C";
}
ByteToCharCp943C() {
super();
super.mask1 = mask1;
super.mask2 = mask2;
super.shift = shift;
super.leadByte = leadByte;
super.singleByteToChar = singleByteToChar;
super.index1 = index1;
super.index2 = index2;
}
public ByteToCharCp943C() {
super((DoubleByte.Decoder)new IBM943C().newDecoder());
}
}

@ -24,105 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM948;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Cp948 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp948
extends ByteToCharDBCS_ASCII
public class ByteToCharCp948 extends ByteToCharDBCS_ASCII {
{
private static IBM948 nioCoder = new IBM948();
// Return the character set id
public String getCharacterEncoding() {
return "Cp948";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp948";
}
private static final boolean leadByte[] = {
false, false, false, false, false, false, false, false, // 00 - 07
false, false, false, false, false, false, false, false, // 08 - 0F
false, false, false, false, false, false, false, false, // 10 - 17
false, false, false, false, false, false, false, false, // 18 - 1F
false, false, false, false, false, false, false, false, // 20 - 27
false, false, false, false, false, false, false, false, // 28 - 2F
false, false, false, false, false, false, false, false, // 30 - 37
false, false, false, false, false, false, false, false, // 38 - 3F
false, false, false, false, false, false, false, false, // 40 - 47
false, false, false, false, false, false, false, false, // 48 - 4F
false, false, false, false, false, false, false, false, // 50 - 57
false, false, false, false, false, false, false, false, // 58 - 5F
false, false, false, false, false, false, false, false, // 60 - 67
false, false, false, false, false, false, false, false, // 68 - 6F
false, false, false, false, false, false, false, false, // 70 - 77
false, false, false, false, false, false, false, false, // 78 - 7F
false, true, true, true, true, false, true, true, // 80 - 87
true, true, true, true, true, true, true, true, // 88 - 8F
true, true, true, true, true, true, true, true, // 90 - 97
true, true, true, true, true, true, true, true, // 98 - 9F
true, true, true, true, true, true, true, true, // A0 - A7
true, true, true, true, true, true, true, true, // A8 - AF
true, true, true, true, true, true, true, true, // B0 - B7
true, true, true, true, true, true, true, true, // B8 - BF
true, true, true, true, true, true, true, true, // C0 - C7
true, true, true, true, true, true, true, true, // C8 - CF
true, true, false, false, false, false, false, false, // D0 - D7
false, false, false, true, true, true, true, true, // D8 - DF
true, true, true, true, true, true, true, true, // E0 - E7
true, true, true, true, true, true, true, true, // E8 - EF
true, true, true, true, true, true, true, true, // F0 - F7
true, true, true, true, false, false, false, false, // F8 - FF
};
private static final String singleByteToChar =
"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007" +
"\u0008\u0009\n\u000B\u000C\r\u000E\u000F" +
"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017" +
"\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" +
"\u0020\u0021\"\u0023\u0024\u0025\u0026\u0027" +
"\u0028\u0029\u002A\u002B\u002C\u002D\u002E\u002F" +
"\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037" +
"\u0038\u0039\u003A\u003B\u003C\u003D\u003E\u003F" +
"\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047" +
"\u0048\u0049\u004A\u004B\u004C\u004D\u004E\u004F" +
"\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057" +
"\u0058\u0059\u005A\u005B\\\u005D\u005E\u005F" +
"\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067" +
"\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F" +
"\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077" +
"\u0078\u0079\u007A\u007B\u007C\u007D\u007E\u007F" +
"\u00A2\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u00AC\u00A6\uFFFD"
;
public ByteToCharCp948() {
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.leadByte = this.leadByte;
super.singleByteToChar = this.singleByteToChar;
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp948() {
super((DoubleByte.Decoder)new IBM948().newDecoder());
}
}

@ -24,70 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM949;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Cp949 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp949
extends ByteToCharDBCS_ASCII
public class ByteToCharCp949 extends ByteToCharDBCS_ASCII {
{
private final static IBM949 nioCoder = new IBM949();
// Return the character set id
public String getCharacterEncoding() {
return "Cp949";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp949";
}
private static final boolean leadByte[] = {
false, false, false, false, false, false, false, false, // 00 - 07
false, false, false, false, false, false, false, false, // 08 - 0F
false, false, false, false, false, false, false, false, // 10 - 17
false, false, false, false, false, false, false, false, // 18 - 1F
false, false, false, false, false, false, false, false, // 20 - 27
false, false, false, false, false, false, false, false, // 28 - 2F
false, false, false, false, false, false, false, false, // 30 - 37
false, false, false, false, false, false, false, false, // 38 - 3F
false, false, false, false, false, false, false, false, // 40 - 47
false, false, false, false, false, false, false, false, // 48 - 4F
false, false, false, false, false, false, false, false, // 50 - 57
false, false, false, false, false, false, false, false, // 58 - 5F
false, false, false, false, false, false, false, false, // 60 - 67
false, false, false, false, false, false, false, false, // 68 - 6F
false, false, false, false, false, false, false, false, // 70 - 77
false, false, false, false, false, false, false, false, // 78 - 7F
false, false, false, false, false, false, false, false, // 80 - 87
false, false, false, false, false, false, false, true, // 88 - 8F
true, true, true, true, true, true, true, true, // 90 - 97
true, true, true, true, true, true, true, true, // 98 - 9F
true, true, true, true, true, true, true, true, // A0 - A7
true, true, true, true, true, false, false, false, // A8 - AF
true, true, true, true, true, true, true, true, // B0 - B7
true, true, true, true, true, true, true, true, // B8 - BF
true, true, true, true, true, true, true, true, // C0 - C7
true, true, true, true, true, true, true, true, // C8 - CF
true, true, true, true, true, true, true, true, // D0 - D7
true, true, true, true, true, true, true, true, // D8 - DF
true, true, true, true, true, true, true, true, // E0 - E7
true, true, true, true, true, true, true, true, // E8 - EF
true, true, true, true, true, true, true, true, // F0 - F7
true, true, true, true, true, true, true, false, // F8 - FF
};
public ByteToCharCp949() {
super();
super.mask1 = 0xFFE0;
super.mask2 = 0x001F;
super.shift = 5;
super.leadByte = this.leadByte;
super.singleByteToChar = nioCoder.getDecoderSingleByteMappings();
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp949() {
super((DoubleByte.Decoder)new IBM949().newDecoder());
}
}

@ -25,44 +25,16 @@
package sun.io;
import sun.io.*;
import sun.nio.cs.ext.*;
public class ByteToCharCp949C extends ByteToCharDBCS_ASCII {
protected static final String singleByteToChar;
protected static final boolean leadByte[];
protected static final short index1[];
protected static final String index2;
protected static final int mask1;
protected static final int mask2;
protected static final int shift;
static {
ByteToCharDBCS_ASCII y = new ByteToCharCp949();
mask1 = y.mask1;
mask2 = y.mask2;
shift = y.shift;
leadByte = y.leadByte;
index1 = y.index1;
index2 = y.index2;
// Return the character set id
public String getCharacterEncoding() {
return "Cp949C";
}
/* Fix converter to pass through 0x00 to 0x7f unchanged to U+0000 to U+007F */
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
singleByteToChar = indexs + y.singleByteToChar.substring(indexs.length());
}
public String getCharacterEncoding() {
return "Cp949C";
}
ByteToCharCp949C() {
super();
super.mask1 = mask1;
super.mask2 = mask2;
super.shift = shift;
super.leadByte = leadByte;
super.singleByteToChar = singleByteToChar;
super.index1 = index1;
super.index2 = index2;
}
public ByteToCharCp949C() {
super((DoubleByte.Decoder)new IBM949C().newDecoder());
}
}

@ -24,105 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM950;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Cp950 to Unicode.
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp950
extends ByteToCharDBCS_ASCII
public class ByteToCharCp950 extends ByteToCharDBCS_ASCII {
{
private static IBM950 nioCoder = new IBM950();
// Return the character set id
public String getCharacterEncoding() {
return "Cp950";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp950";
}
private static final boolean leadByte[] = {
false, false, false, false, false, false, false, false, // 00 - 07
false, false, false, false, false, false, false, false, // 08 - 0F
false, false, false, false, false, false, false, false, // 10 - 17
false, false, false, false, false, false, false, false, // 18 - 1F
false, false, false, false, false, false, false, false, // 20 - 27
false, false, false, false, false, false, false, false, // 28 - 2F
false, false, false, false, false, false, false, false, // 30 - 37
false, false, false, false, false, false, false, false, // 38 - 3F
false, false, false, false, false, false, false, false, // 40 - 47
false, false, false, false, false, false, false, false, // 48 - 4F
false, false, false, false, false, false, false, false, // 50 - 57
false, false, false, false, false, false, false, false, // 58 - 5F
false, false, false, false, false, false, false, false, // 60 - 67
false, false, false, false, false, false, false, false, // 68 - 6F
false, false, false, false, false, false, false, false, // 70 - 77
false, false, false, false, false, false, false, false, // 78 - 7F
false, true, true, true, true, true, true, true, // 80 - 87
true, true, true, true, true, true, true, true, // 88 - 8F
true, true, true, true, true, true, true, true, // 90 - 97
true, true, true, true, true, true, true, true, // 98 - 9F
true, true, true, true, true, true, true, true, // A0 - A7
true, true, true, true, true, true, true, true, // A8 - AF
true, true, true, true, true, true, true, true, // B0 - B7
true, true, true, true, true, true, true, true, // B8 - BF
true, true, true, true, true, true, true, true, // C0 - C7
true, true, true, true, true, true, true, true, // C8 - CF
true, true, true, true, true, true, true, true, // D0 - D7
true, true, true, true, true, true, true, true, // D8 - DF
true, true, true, true, true, true, true, true, // E0 - E7
true, true, true, true, true, true, true, true, // E8 - EF
true, true, true, true, true, true, true, true, // F0 - F7
true, true, true, true, true, true, true, false, // F8 - FF
};
private static final String singleByteToChar =
"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007" +
"\u0008\u0009\n\u000B\u000C\r\u000E\u000F" +
"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017" +
"\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" +
"\u0020\u0021\"\u0023\u0024\u0025\u0026\u0027" +
"\u0028\u0029\u002A\u002B\u002C\u002D\u002E\u002F" +
"\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037" +
"\u0038\u0039\u003A\u003B\u003C\u003D\u003E\u003F" +
"\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047" +
"\u0048\u0049\u004A\u004B\u004C\u004D\u004E\u004F" +
"\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057" +
"\u0058\u0059\u005A\u005B\\\u005D\u005E\u005F" +
"\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067" +
"\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F" +
"\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077" +
"\u0078\u0079\u007A\u007B\u007C\u007D\u007E\u007F" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
;
public ByteToCharCp950() {
super();
super.mask1 = 0xFFE0;
super.mask2 = 0x001F;
super.shift = 5;
super.leadByte = this.leadByte;
super.singleByteToChar = this.singleByteToChar;
super.index1 = nioCoder.getDecoderIndex1();
super.index2 = nioCoder.getDecoderIndex2();
}
public ByteToCharCp950() {
super((DoubleByte.Decoder)new IBM950().newDecoder());
}
}

@ -24,30 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM970;
import sun.nio.cs.ext.*;
/**
* A table to convert Cp970 to Unicode
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class ByteToCharCp970
extends ByteToCharEUC
public class ByteToCharCp970 extends ByteToCharEUC2 {
{
private final static IBM970 nioCoder = new IBM970();
// Return the character set id
public String getCharacterEncoding() {
return "Cp970";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp970";
}
public ByteToCharCp970()
{
// Set the correct mapping table
super();
super.byteToCharTable = nioCoder.getDecoderSingleByteMappings();
super.mappingTableG1 = nioCoder.getDecoderMappingTableG1();
}
public ByteToCharCp970() {
super((DoubleByte.Decoder)new IBM970().newDecoder());
}
}

@ -24,23 +24,28 @@
*/
package sun.io;
import sun.nio.cs.ext.DoubleByte;
import static sun.nio.cs.CharsetMapping.*;
public abstract class ByteToCharDBCS_ASCII extends ByteToCharConverter
{
private boolean savedBytePresent;
private byte savedByte;
private int savedByte;
protected String singleByteToChar;
protected boolean leadByte[];
protected short index1[];
protected String index2;
protected int mask1;
protected int mask2;
protected int shift;
private DoubleByte.Decoder dec;
public ByteToCharDBCS_ASCII() {
public ByteToCharDBCS_ASCII(DoubleByte.Decoder dec) {
super();
savedBytePresent = false;
this.dec = dec;
}
char decodeSingle(int b) {
return dec.decodeSingle(b);
}
char decodeDouble(int b1, int b2) {
return dec.decodeDouble(b1, b2);
}
public int flush(char [] output, int outStart, int outEnd)
@ -66,18 +71,17 @@ public abstract class ByteToCharDBCS_ASCII extends ByteToCharConverter
ConversionBufferFullException
{
int inputSize;
char outputChar = '\uFFFD';
char outputChar = UNMAPPABLE_DECODING;
charOff = outOff;
byteOff = inOff;
while(byteOff < inEnd)
{
int byte1, byte2;
int v;
int byte1;
if (!savedBytePresent) {
byte1 = input[byteOff];
byte1 = input[byteOff] & 0xff;
inputSize = 1;
} else {
byte1 = savedByte;
@ -85,33 +89,21 @@ public abstract class ByteToCharDBCS_ASCII extends ByteToCharConverter
inputSize = 0;
}
if (byte1 < 0)
byte1 += 256;
if (!leadByte[byte1])
{
outputChar = singleByteToChar.charAt(byte1);
} else {
outputChar = decodeSingle(byte1);
if (outputChar == UNMAPPABLE_DECODING) {
if (byteOff + inputSize >= inEnd) {
savedByte = (byte)byte1;
savedByte = byte1;
savedBytePresent = true;
byteOff += inputSize;
break;
}
byte2 = input[byteOff+inputSize];
if (byte2 < 0)
byte2 += 256;
outputChar = decodeDouble(byte1, input[byteOff+inputSize] & 0xff);
inputSize++;
// Lookup in the two level index
v = byte1 * 256 + byte2;
outputChar = index2.charAt(index1[((v & mask1) >> shift)] + (v & mask2));
}
if (outputChar == '\uFFFD') {
if (outputChar == UNMAPPABLE_DECODING) {
if (subMode)
outputChar = subChars[0];
else {

@ -24,6 +24,9 @@
*/
package sun.io;
import sun.nio.cs.ext.DoubleByte;
import static sun.nio.cs.CharsetMapping.*;
public abstract class ByteToCharDBCS_EBCDIC extends ByteToCharConverter
{
@ -35,20 +38,23 @@ public abstract class ByteToCharDBCS_EBCDIC extends ByteToCharConverter
private int currentState;
private boolean savedBytePresent;
private byte savedByte;
private int savedByte;
protected String singleByteToChar;
protected short index1[];
protected String index2;
protected int mask1;
protected int mask2;
protected int shift;
private DoubleByte.Decoder dec;
public ByteToCharDBCS_EBCDIC() {
public ByteToCharDBCS_EBCDIC(DoubleByte.Decoder dec) {
super();
currentState = SBCS;
savedBytePresent = false;
this.dec = dec;
}
char decodeSingle(int b) {
return dec.decodeSingle(b);
}
char decodeDouble(int b1, int b2) {
return dec.decodeDouble(b1, b2);
}
public int flush(char [] output, int outStart, int outEnd)
@ -74,17 +80,16 @@ public abstract class ByteToCharDBCS_EBCDIC extends ByteToCharConverter
ConversionBufferFullException
{
int inputSize;
char outputChar = '\uFFFD';
char outputChar = UNMAPPABLE_DECODING;
charOff = outOff;
byteOff = inOff;
while(byteOff < inEnd) {
int byte1, byte2;
int v;
if (!savedBytePresent) {
byte1 = input[byteOff];
byte1 = input[byteOff] & 0xff;
inputSize = 1;
} else {
byte1 = savedByte;
@ -122,11 +127,8 @@ public abstract class ByteToCharDBCS_EBCDIC extends ByteToCharConverter
// Process the real data characters
if (byte1 < 0)
byte1 += 256;
if (currentState == SBCS) {
outputChar = singleByteToChar.charAt(byte1);
outputChar = decodeSingle(byte1);
} else {
// for a DBCS character - architecture dictates the
@ -141,16 +143,13 @@ public abstract class ByteToCharDBCS_EBCDIC extends ByteToCharConverter
// We have been split in the middle if a character
// save the first byte for next time around
savedByte = (byte)byte1;
savedByte = byte1;
savedBytePresent = true;
byteOff += inputSize;
break;
}
byte2 = input[byteOff+inputSize];
if (byte2 < 0)
byte2 += 256;
byte2 = input[byteOff+inputSize] & 0xff;
inputSize++;
// validate the pair of bytes meet the architecture
@ -161,12 +160,10 @@ public abstract class ByteToCharDBCS_EBCDIC extends ByteToCharConverter
throw new MalformedInputException();
}
// Lookup in the two level index
v = byte1 * 256 + byte2;
outputChar = index2.charAt(index1[((v & mask1) >> shift)] + (v & mask2));
outputChar = decodeDouble(byte1, byte2);
}
if (outputChar == '\uFFFD') {
if (outputChar == UNMAPPABLE_DECODING) {
if (subMode)
outputChar = subChars[0];
else {

@ -0,0 +1,138 @@
/*
* Copyright 1997 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package sun.io;
import sun.nio.cs.ext.DoubleByte;
import static sun.nio.cs.CharsetMapping.*;
public abstract class ByteToCharEUC2 extends ByteToCharConverter
{
private final int G0 = 0;
private final int G1 = 1;
private final int SS2 = 0x8E;
private final int SS3 = 0x8F;
private int firstByte, state;
private DoubleByte.Decoder dec;
public ByteToCharEUC2(DoubleByte.Decoder dec) {
super();
state = G0;
this.dec = dec;
}
char decodeSingle(int b) {
return dec.decodeSingle(b);
}
char decodeDouble(int b1, int b2) {
return dec.decodeDouble(b1, b2);
}
/**
* flush out any residual data and reset the buffer state
*/
public int flush(char[] output, int outStart, int outEnd)
throws MalformedInputException
{
if (state != G0) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
reset();
return 0;
}
/**
* Resets the converter.
*/
public void reset() {
state = G0;
charOff = byteOff = 0;
}
/**
* Character conversion
*/
public int convert(byte[] input, int inOff, int inEnd,
char[] output, int outOff, int outEnd)
throws UnknownCharacterException, MalformedInputException,
ConversionBufferFullException
{
int byte1;
char outputChar = UNMAPPABLE_DECODING;
byteOff = inOff;
charOff = outOff;
while (byteOff < inEnd) {
byte1 = input[byteOff] & 0xff;
switch (state) {
case G0:
if (byte1 == SS2 || // no general support
byte1 == SS3 ) { // for g2 or g3
badInputLength = 1;
throw new MalformedInputException();
}
if ( byte1 <= 0x9f ) // < 0x9f has its own table
outputChar = decodeSingle(byte1);
else
if (byte1 < 0xa1 || byte1 > 0xfe) { // byte within range?
badInputLength = 1;
throw new MalformedInputException();
} else { // G1 set first byte
firstByte = byte1;
state = G1;
}
break;
case G1:
state = G0;
if ( byte1 < 0xa1 || byte1 > 0xfe) { // valid G1 set second byte
badInputLength = 1;
throw new MalformedInputException();
}
outputChar = decodeDouble(firstByte, byte1);
break;
}
if (state == G0) {
if (outputChar == UNMAPPABLE_DECODING) {
if (subMode)
outputChar = subChars[0];
else {
badInputLength = 1;
throw new UnknownCharacterException();
}
}
if (charOff >= outEnd)
throw new ConversionBufferFullException();
output[charOff++] = outputChar;
}
byteOff++;
}
return charOff - outOff;
}
}

@ -24,34 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM1381;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Unicode to Cp1381
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class CharToByteCp1381
extends CharToByteDBCS_ASCII
public class CharToByteCp1381 extends CharToByteDBCS_ASCII {
{
// Return the character set id
public String getCharacterEncoding() {
return "Cp1381";
}
private final static IBM1381 nioCoder = new IBM1381();
// Return the character set id
public String getCharacterEncoding()
{
return "Cp1381";
}
public CharToByteCp1381()
{
super();
super.mask1 = 0xFFE0;
super.mask2 = 0x001F;
super.shift = 5;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
}
public CharToByteCp1381() {
super((DoubleByte.Encoder)new IBM1381().newEncoder());
}
}

@ -24,34 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM1383;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Unicode to Cp1383
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class CharToByteCp1383
extends CharToByteDBCS_ASCII
public class CharToByteCp1383 extends CharToByteDBCS_ASCII {
{
// Return the character set id
public String getCharacterEncoding() {
return "Cp1383";
}
private final static IBM1383 nioCoder = new IBM1383();
// Return the character set id
public String getCharacterEncoding()
{
return "Cp1383";
}
public CharToByteCp1383()
{
super();
super.mask1 = 0xFFE0;
super.mask2 = 0x001F;
super.shift = 5;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
}
public CharToByteCp1383() {
super((DoubleByte.Encoder)new IBM1383().newEncoder());
}
}

@ -24,46 +24,17 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM933;
import sun.nio.cs.ext.*;
//EBIDIC DBCSONLY Korean
public class CharToByteCp834 extends CharToByteCp933
{
public class CharToByteCp834 extends CharToByteDBCS_ASCII {
public CharToByteCp834() {
super();
super((DoubleByte.Encoder)new IBM834().newEncoder());
subBytes = new byte[] {(byte)0xfe, (byte)0xfe};
}
protected boolean doSBCS() {
return false;
}
protected int encodeHangul(char ch) {
int theBytes = super.encodeHangul(ch);
if (theBytes == -1) {
// Cp834 has 6 additional non-roundtrip char->bytes
// mappings, see#6379808
if (ch == '\u00b7') {
return 0x4143;
} else if (ch == '\u00ad') {
return 0x4148;
} else if (ch == '\u2015') {
return 0x4149;
} else if (ch == '\u223c') {
return 0x42a1;
} else if (ch == '\uff5e') {
return 0x4954;
} else if (ch == '\u2299') {
return 0x496f;
}
} else if (((theBytes & 0xff00)>>8) == 0) {
//SBCS, including 0
return -1;
}
return theBytes;
}
public int getMaxBytesPerChar() {
return 2;
}

@ -24,36 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM930;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Unicode to Cp930
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class CharToByteCp930
extends CharToByteDBCS_EBCDIC
public class CharToByteCp930 extends CharToByteDBCS_EBCDIC {
{
private final static IBM930 nioCoder = new IBM930();
// Return the character set id
public String getCharacterEncoding() {
return "Cp930";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp930";
}
public CharToByteCp930()
{
super();
super.mask1 = 0xFFE0;
super.mask2 = 0x001F;
super.shift = 5;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
subBytes = new byte[1];
subBytes[0] = 0x6f;
}
public CharToByteCp930() {
super((DoubleByte.Encoder)new IBM930().newEncoder());
}
}

@ -1,5 +1,5 @@
/*
* Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-2003 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,462 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM933;
import sun.nio.cs.ext.*;
/**
* @author Malcolm Ayres
*/
public class CharToByteCp933 extends CharToByteConverter
{
private static final char SBase = '\uAC00';
private static final char LBase = '\u1100';
private static final char VBase = '\u1161';
private static final char TBase = '\u11A7';
private static final int VCount = 21;
private static final int TCount = 28;
private static final byte G0 = 0;
private static final byte G1 = 1;
private static final byte G2 = 2;
private static final byte G3 = 3;
private byte charState = G0;
private char l, v, t;
private int byteState;
private byte[] outputByte;
private static final int SBCS = 0;
private static final int DBCS = 1;
private static final byte SO = 0x0e;
private static final byte SI = 0x0f;
private char highHalfZoneCode;
private short[] index1;
private String index2;
private String index2a;
private int mask1;
private int mask2;
private int shift;
private final static IBM933 nioCoder = new IBM933();
public class CharToByteCp933 extends CharToByteDBCS_EBCDIC {
// Return the character set id
public String getCharacterEncoding() {
return "Cp933";
}
public CharToByteCp933() {
super();
byteState = doSBCS()?SBCS:DBCS;
highHalfZoneCode = 0;
outputByte = new byte[2];
mask1 = 0xFFF8;
mask2 = 0x0007;
shift = 3;
index1 = nioCoder.getEncoderIndex1();
index2 = nioCoder.getEncoderIndex2();
index2a = nioCoder.getEncoderIndex2a();
subBytes = new byte[1];
subBytes[0] = 0x6f;
}
/**
* flush out any residual data and reset the buffer state
*/
public int flush(byte[] output, int outStart, int outEnd)
throws MalformedInputException,
ConversionBufferFullException
{
int bytesOut;
byteOff = outStart;
if (highHalfZoneCode != 0) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
if (charState != G0) {
try {
unicodeToBuffer(composeHangul() ,output, outEnd);
}
catch(UnknownCharacterException e) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
charState = G0;
}
if (byteState == DBCS && doSBCS()) {
if (byteOff >= outEnd)
throw new ConversionBufferFullException();
output[byteOff++] = SI;
byteState = SBCS;
}
bytesOut = byteOff - outStart;
reset();
return bytesOut;
}
/**
* Resets converter to its initial state.
*/
public void reset() {
byteState = doSBCS()?SBCS:DBCS;
highHalfZoneCode = 0;
charState = G0;
charOff = byteOff = 0;
}
/**
* Returns true if the given character can be converted to the
* target character encoding.
*/
public boolean canConvert(char ch) {
return encodeHangul(ch) != -1;
}
/**
* Sets the substitution bytes to use when the converter is in
* substitution mode. The given bytes should represent a valid
* character in the target character encoding.
*/
public void setSubstitutionBytes( byte[] newSubBytes )
throws IllegalArgumentException
{
if( newSubBytes.length > 2 || newSubBytes.length == 0) {
throw new IllegalArgumentException();
}
subBytes = new byte[ newSubBytes.length ];
System.arraycopy( newSubBytes, 0, subBytes, 0, newSubBytes.length );
}
/**
* Character conversion
*/
public int convert(char[] input, int inOff, int inEnd,
byte[] output, int outOff, int outEnd)
throws UnknownCharacterException, MalformedInputException,
ConversionBufferFullException
{
char inputChar;
int inputSize;
charOff = inOff;
byteOff = outOff;
while (charOff < inEnd) {
if (highHalfZoneCode == 0) {
inputChar = input[charOff];
inputSize = 1;
} else {
inputChar = highHalfZoneCode;
inputSize = 0;
highHalfZoneCode = 0;
}
switch (charState) {
case G0:
l = LBase;
v = VBase;
t = TBase;
if ( isLeadingC(inputChar) ) { // Leading Consonant
l = inputChar;
charState = G1;
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = inputChar;
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
break;
case G1:
if ( isLeadingC(inputChar) ) { // Leading Consonant
l = composeLL(l, inputChar);
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = inputChar;
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
case G2:
if ( isLeadingC(inputChar) ) { // Leading Consonant
unicodeToBuffer(composeHangul(), output, outEnd);
l = inputChar;
v = VBase;
t = TBase;
charState = G1;
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = composeVV(l, inputChar);
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
case G3:
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = composeTT(t, inputChar);
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
}
if (charState != G0)
charOff++;
else {
// Is this a high surrogate?
if(inputChar >= '\ud800' && inputChar <= '\udbff') {
// Is this the last character of the input?
if (charOff + inputSize >= inEnd) {
highHalfZoneCode = inputChar;
charOff += inputSize;
break;
}
// Is there a low surrogate following?
inputChar = input[charOff + inputSize];
if (inputChar >= '\udc00' && inputChar <= '\udfff') {
// We have a valid surrogate pair. Too bad we don't do
// surrogates. Is substitution enabled?
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
bytesToBuffer(outputByte, output, outEnd);
inputSize++;
} else {
badInputLength = 2;
throw new UnknownCharacterException();
}
} else {
// We have a malformed surrogate pair
badInputLength = 1;
throw new MalformedInputException();
}
}
// Is this an unaccompanied low surrogate?
else
if (inputChar >= '\uDC00' && inputChar <= '\uDFFF') {
badInputLength = 1;
throw new MalformedInputException();
} else {
unicodeToBuffer(inputChar, output, outEnd);
}
charOff += inputSize;
}
}
return byteOff - outOff;
}
private char composeHangul() {
int lIndex, vIndex, tIndex;
lIndex = l - LBase;
vIndex = v - VBase;
tIndex = t - TBase;
return (char)((lIndex * VCount + vIndex) * TCount + tIndex + SBase);
}
private char composeLL(char l1, char l2) {
return l2;
}
private char composeVV(char v1, char v2) {
return v2;
}
private char composeTT(char t1, char t2) {
return t2;
}
private boolean isLeadingC(char c) {
return (c >= LBase && c <= '\u1159');
}
private boolean isVowel(char c) {
return (c >= VBase && c <= '\u11a2');
}
private boolean isTrailingC(char c) {
return (c >= TBase && c <= '\u11f9');
}
/**
* returns the maximum number of bytes needed to convert a char
*/
public int getMaxBytesPerChar() {
return 4;
}
/**
* Return the character set ID
*/
public String getCharacterEncoding() {
return "Cp933";
}
/**
* private function to add the bytes to the output buffer
*/
private void bytesToBuffer(byte[] theBytes, byte[] output, int outEnd)
throws ConversionBufferFullException,
UnknownCharacterException {
int spaceNeeded;
// Set the output buffer into the correct state
if (byteState == DBCS && theBytes[0] == 0x00) {
if (byteOff >= outEnd)
throw new ConversionBufferFullException();
byteState = SBCS;
output[byteOff++] = SI;
} else
if (byteState == SBCS && theBytes[0] != 0x00) {
if (byteOff >= outEnd)
throw new ConversionBufferFullException();
byteState = DBCS;
output[byteOff++] = SO;
}
// ensure sufficient space for the bytes(s)
if (byteState == DBCS)
spaceNeeded = 2;
else
spaceNeeded = 1;
if (byteOff + spaceNeeded > outEnd)
throw new ConversionBufferFullException();
// move the data into the buffer
if (byteState == SBCS)
output[byteOff++] = theBytes[1];
else {
output[byteOff++] = theBytes[0];
output[byteOff++] = theBytes[1];
}
}
// return -1 for unmappable character
protected int encodeHangul(char unicode) {
int theBytes;
int index;
index = index1[((unicode & mask1) >> shift)] + (unicode & mask2);
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
// The input char is undefined if theBytes is 0 and the char is NOT unicode 0
if (theBytes == 0 && unicode != '\u0000')
return -1;
return theBytes;
}
/**
* private function to add a unicode character to the output buffer
*/
private void unicodeToBuffer(char unicode, byte[] output, int outEnd)
throws ConversionBufferFullException,
UnknownCharacterException {
// first we convert the unicode to its byte representation
int theBytes = encodeHangul(unicode);
// if the unicode was not mappable - look for the substitution bytes
if (theBytes == -1) {
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
} else {
badInputLength = 1;
throw new UnknownCharacterException();
}
} else {
outputByte[0] = (byte)((theBytes & 0x0000ff00)>>8);
outputByte[1] = (byte)(theBytes & 0x000000ff);
}
// now put the bytes in the buffer
bytesToBuffer(outputByte, output, outEnd);
}
//Methods below are for subclass Cp834
protected boolean doSBCS() {
return true;
super((DoubleByte.Encoder)new IBM933().newEncoder());
}
}

@ -24,35 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM935;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Unicode to Cp935
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class CharToByteCp935
extends CharToByteDBCS_EBCDIC
public class CharToByteCp935 extends CharToByteDBCS_EBCDIC {
{
private final static IBM935 nioCoder = new IBM935();
// Return the character set id
public String getCharacterEncoding() {
return "Cp935";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp935";
}
public CharToByteCp935()
{
super();
super.mask1 = 0xFFE0;
super.mask2 = 0x001F;
super.shift = 5;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
subBytes = new byte[1];
subBytes[0] = 0x6f;
}
public CharToByteCp935() {
super((DoubleByte.Encoder)new IBM935().newEncoder());
}
}

@ -24,39 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM937;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Unicode to Cp937
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class CharToByteCp937
extends CharToByteDBCS_EBCDIC
public class CharToByteCp937 extends CharToByteDBCS_EBCDIC {
{
// Return the character set id
public String getCharacterEncoding() {
return "Cp937";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp937";
}
private short index1[];
private String index2;
private String index2a;
private static final IBM937 nioCoder = new IBM937();
public CharToByteCp937()
{
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
subBytes = new byte[1];
subBytes[0] = 0x6f;
}
public CharToByteCp937() {
super((DoubleByte.Encoder)new IBM937().newEncoder());
}
}

@ -24,36 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM939;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Unicode to Cp939
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class CharToByteCp939
extends CharToByteDBCS_EBCDIC
public class CharToByteCp939 extends CharToByteDBCS_EBCDIC {
{
// Return the character set id
public String getCharacterEncoding() {
return "Cp939";
}
private final static IBM939 nioCoder = new IBM939();
// Return the character set id
public String getCharacterEncoding()
{
return "Cp939";
}
public CharToByteCp939()
{
super();
super.mask1 = 0xFFE0;
super.mask2 = 0x001F;
super.shift = 5;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
subBytes = new byte[1];
subBytes[0] = 0x6f;
}
public CharToByteCp939() {
super((DoubleByte.Encoder)new IBM939().newEncoder());
}
}

@ -24,33 +24,16 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM942;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Unicode to Cp942
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class CharToByteCp942
extends CharToByteDBCS_ASCII
public class CharToByteCp942 extends CharToByteDBCS_ASCII {
{
private static IBM942 nioCoder = new IBM942();
// Return the character set id
public String getCharacterEncoding() {
return "Cp942";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp942";
}
public CharToByteCp942()
{
super();
super.mask1 = 0xFFE0;
super.mask2 = 0x001F;
super.shift = 5;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
}
public CharToByteCp942() {
super((DoubleByte.Encoder)new IBM942().newEncoder());
}
}

@ -25,47 +25,16 @@
package sun.io;
import sun.io.*;
import sun.nio.cs.ext.*;
public class CharToByteCp942C extends CharToByteDBCS_ASCII {
protected static final int mask1;
protected static final int mask2;
protected static final int shift;
protected static final short index1[];
protected static final String index2;
protected static final String index2a;
static {
CharToByteDBCS_ASCII y = new CharToByteCp942();
mask1 = y.mask1;
mask2 = y.mask2;
shift = y.shift;
index2 = y.index2;
// Return the character set id
public String getCharacterEncoding() {
return "Cp942C";
}
/* Fix converter to pass through U+0000 to U+007F unchanged to 0x00 to 0x7f */
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
index2a = y.index2a + indexs;
int o = y.index2a.length() + 15000;
index1 = new short[y.index1.length];
System.arraycopy(y.index1, 0, index1, 0, y.index1.length);
for (int i = 0; i * (1<<shift) < 128; ++i) {
index1[i] = (short)(o + i * (1<<shift));
}
}
public String getCharacterEncoding() {
return "Cp942C";
}
CharToByteCp942C() {
super();
super.mask1 = mask1;
super.mask2 = mask2;
super.shift = shift;
super.index1 = index1;
super.index2 = index2;
super.index2a = index2a;
}
public CharToByteCp942C() {
super((DoubleByte.Encoder)new IBM942C().newEncoder());
}
}

@ -22,34 +22,19 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
// Table from Unicode to Cp943
package sun.io;
import sun.nio.cs.ext.IBM943;
/**
* Tables and data to convert Unicode to Cp943
*
* @author BuildTables tool
*/
import sun.nio.cs.ext.*;
public class CharToByteCp943 extends CharToByteDBCS_ASCII {
private static IBM943 nioCoder = new IBM943();
// Return the character set id
public String getCharacterEncoding() {
return "Cp943";
}
public CharToByteCp943() {
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
subBytes = new byte[1];
subBytes[0] = 0x6f;
super((DoubleByte.Encoder)new IBM943().newEncoder());
}
}

@ -25,47 +25,16 @@
package sun.io;
import sun.io.*;
import sun.nio.cs.ext.*;
public class CharToByteCp943C extends CharToByteDBCS_ASCII {
protected static final int mask1;
protected static final int mask2;
protected static final int shift;
protected static final short index1[];
protected static final String index2;
protected static final String index2a;
static {
CharToByteDBCS_ASCII y = new CharToByteCp943();
mask1 = y.mask1;
mask2 = y.mask2;
shift = y.shift;
index2 = y.index2;
// Return the character set id
public String getCharacterEncoding() {
return "Cp943C";
}
/* Fix converter to pass through U+0000 to U+007F unchanged to 0x00 to 0x7f */
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
index2a = y.index2a + indexs;
int o = y.index2a.length() + 15000;
index1 = new short[y.index1.length];
System.arraycopy(y.index1, 0, index1, 0, y.index1.length);
for (int i = 0; i * (1<<shift) < 128; ++i) {
index1[i] = (short)(o + i * (1<<shift));
}
}
public String getCharacterEncoding() {
return "Cp943C";
}
CharToByteCp943C() {
super();
super.mask1 = mask1;
super.mask2 = mask2;
super.shift = shift;
super.index1 = index1;
super.index2 = index2;
super.index2a = index2a;
}
public CharToByteCp943C() {
super((DoubleByte.Encoder)new IBM943C().newEncoder());
}
}

@ -22,36 +22,19 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package sun.io;
import sun.nio.cs.ext.IBM948;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Unicode to Cp948
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class CharToByteCp948
extends CharToByteDBCS_ASCII
public class CharToByteCp948 extends CharToByteDBCS_ASCII {
{
private static IBM948 nioCoder = new IBM948();
// Return the character set id
public String getCharacterEncoding() {
return "Cp948";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp948";
}
public CharToByteCp948()
{
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
}
public CharToByteCp948() {
super((DoubleByte.Encoder)new IBM948().newEncoder());
}
}

@ -22,418 +22,19 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package sun.io;
import sun.nio.cs.ext.IBM949;
import sun.nio.cs.ext.*;
/**
* @author Malcolm Ayres
*/
public class CharToByteCp949 extends CharToByteDBCS_ASCII {
public class CharToByteCp949 extends CharToByteConverter
{
private static final char SBase = '\uAC00';
private static final char LBase = '\u1100';
private static final char VBase = '\u1161';
private static final char TBase = '\u11A7';
private static final int VCount = 21;
private static final int TCount = 28;
private static final byte G0 = 0;
private static final byte G1 = 1;
private static final byte G2 = 2;
private static final byte G3 = 3;
private byte charState = G0;
private char l, v, t;
private byte[] outputByte;
private char highHalfZoneCode;
private int mask1;
private int mask2;
private int shift;
private short[] index1;
private String index2;
private String index2a;
private final static IBM949 nioCoder = new IBM949();
// Return the character set id
public String getCharacterEncoding() {
return "Cp949";
}
public CharToByteCp949() {
super();
highHalfZoneCode = 0;
outputByte = new byte[2];
mask1 = 0xFFF8;
mask2 = 0x0007;
shift = 3;
index1 = nioCoder.getEncoderIndex1();
index2 = nioCoder.getEncoderIndex2();
index2a = nioCoder.getEncoderIndex2a();
}
/**
* flush out any residual data and reset the buffer state
*/
public int flush(byte[] output, int outStart, int outEnd)
throws MalformedInputException,
ConversionBufferFullException
{
int bytesOut;
byteOff = outStart;
if (highHalfZoneCode != 0) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
if (charState != G0) {
try {
unicodeToBuffer(composeHangul() ,output, outEnd);
}
catch(UnknownCharacterException e) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
charState = G0;
}
bytesOut = byteOff - outStart;
reset();
return bytesOut;
}
/**
* Resets converter to its initial state.
*/
public void reset() {
highHalfZoneCode = 0;
charState = G0;
charOff = byteOff = 0;
}
/**
* Returns true if the given character can be converted to the
* target character encoding.
*/
public boolean canConvert(char ch) {
int index;
int theBytes;
index = index1[((ch & mask1) >> shift)] + (ch & mask2);
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
if (theBytes != 0)
return (true);
// only return true if input char was unicode null - all others are
// undefined
return( ch == '\u0000');
}
/**
* Character conversion
*/
public int convert(char[] input, int inOff, int inEnd,
byte[] output, int outOff, int outEnd)
throws UnknownCharacterException, MalformedInputException,
ConversionBufferFullException
{
char inputChar;
int inputSize;
charOff = inOff;
byteOff = outOff;
while (charOff < inEnd) {
if (highHalfZoneCode == 0) {
inputChar = input[charOff];
inputSize = 1;
} else {
inputChar = highHalfZoneCode;
inputSize = 0;
highHalfZoneCode = 0;
}
switch (charState) {
case G0:
l = LBase;
v = VBase;
t = TBase;
if ( isLeadingC(inputChar) ) { // Leading Consonant
l = inputChar;
charState = G1;
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = inputChar;
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
break;
case G1:
if ( isLeadingC(inputChar) ) { // Leading Consonant
l = composeLL(l, inputChar);
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = inputChar;
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
case G2:
if ( isLeadingC(inputChar) ) { // Leading Consonant
unicodeToBuffer(composeHangul(), output, outEnd);
l = inputChar;
v = VBase;
t = TBase;
charState = G1;
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = composeVV(l, inputChar);
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
case G3:
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = composeTT(t, inputChar);
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
}
if (charState != G0)
charOff++;
else {
// Is this a high surrogate?
if(inputChar >= '\ud800' && inputChar <= '\udbff') {
// Is this the last character of the input?
if (charOff + inputSize >= inEnd) {
highHalfZoneCode = inputChar;
charOff += inputSize;
break;
}
// Is there a low surrogate following?
inputChar = input[charOff + inputSize];
if (inputChar >= '\udc00' && inputChar <= '\udfff') {
// We have a valid surrogate pair. Too bad we don't do
// surrogates. Is substitution enabled?
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
bytesToBuffer(outputByte, output, outEnd);
inputSize++;
} else {
badInputLength = 2;
throw new UnknownCharacterException();
}
} else {
// We have a malformed surrogate pair
badInputLength = 1;
throw new MalformedInputException();
}
}
// Is this an unaccompanied low surrogate?
else
if (inputChar >= '\uDC00' && inputChar <= '\uDFFF') {
badInputLength = 1;
throw new MalformedInputException();
} else {
unicodeToBuffer(inputChar, output, outEnd);
}
charOff += inputSize;
}
}
return byteOff - outOff;
}
private char composeHangul() {
int lIndex, vIndex, tIndex;
lIndex = l - LBase;
vIndex = v - VBase;
tIndex = t - TBase;
return (char)((lIndex * VCount + vIndex) * TCount + tIndex + SBase);
}
private char composeLL(char l1, char l2) {
return l2;
}
private char composeVV(char v1, char v2) {
return v2;
}
private char composeTT(char t1, char t2) {
return t2;
}
private boolean isLeadingC(char c) {
return (c >= LBase && c <= '\u1159');
}
private boolean isVowel(char c) {
return (c >= VBase && c <= '\u11a2');
}
private boolean isTrailingC(char c) {
return (c >= TBase && c <= '\u11f9');
}
/**
* returns the maximum number of bytes needed to convert a char
*/
public int getMaxBytesPerChar() {
return 2;
}
/**
* Return the character set ID
*/
public String getCharacterEncoding() {
return "Cp949";
}
/**
* private function to add the bytes to the output buffer
*/
private void bytesToBuffer(byte[] theBytes, byte[] output, int outEnd)
throws ConversionBufferFullException,
UnknownCharacterException {
int spaceNeeded;
// ensure sufficient space for the bytes(s)
if (theBytes[0] == 0x00)
spaceNeeded = 1;
else
spaceNeeded = 2;
if (byteOff + spaceNeeded > outEnd)
throw new ConversionBufferFullException();
// move the data into the buffer
if (spaceNeeded == 1)
output[byteOff++] = theBytes[1];
else {
output[byteOff++] = theBytes[0];
output[byteOff++] = theBytes[1];
}
}
/**
* private function to add a unicode character to the output buffer
*/
private void unicodeToBuffer(char unicode, byte[] output, int outEnd)
throws ConversionBufferFullException,
UnknownCharacterException {
int index;
int theBytes;
// first we convert the unicode to its byte representation
index = index1[((unicode & mask1) >> shift)] + (unicode & mask2);
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
outputByte[0] = (byte)((theBytes & 0x0000ff00)>>8);
outputByte[1] = (byte)(theBytes & 0x000000ff);
// if the unicode was not mappable - look for the substitution bytes
if (outputByte[0] == 0x00 && outputByte[1] == 0x00
&& unicode != '\u0000') {
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
} else {
badInputLength = 1;
throw new UnknownCharacterException();
}
}
// now put the bytes in the buffer
bytesToBuffer(outputByte, output, outEnd);
super((DoubleByte.Encoder)new IBM949().newEncoder());
}
}

@ -1,5 +1,5 @@
/*
* Copyright 1997-2003 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,421 +25,16 @@
package sun.io;
import sun.nio.cs.ext.IBM949C;
import sun.nio.cs.ext.*;
/**
* @author Malcolm Ayres
*/
public class CharToByteCp949C extends CharToByteDBCS_ASCII {
/*
Cp949C is a hand-modified version of Cp949
maps Unicode U-005C <-> 0x5C (local code page)
*/
public class CharToByteCp949C extends CharToByteConverter
{
private static final char SBase = '\uAC00';
private static final char LBase = '\u1100';
private static final char VBase = '\u1161';
private static final char TBase = '\u11A7';
private static final int VCount = 21;
private static final int TCount = 28;
private static final byte G0 = 0;
private static final byte G1 = 1;
private static final byte G2 = 2;
private static final byte G3 = 3;
private byte charState = G0;
private char l, v, t;
private byte[] outputByte;
private char highHalfZoneCode;
private int mask1;
private int mask2;
private int shift;
private short[] index1;
private String index2;
private String index2a;
private final static IBM949C nioCoder = new IBM949C();
// Return the character set id
public String getCharacterEncoding() {
return "Cp949C";
}
public CharToByteCp949C() {
super();
index1 = nioCoder.getEncoderIndex1();
index2 = nioCoder.getEncoderIndex2();
index2a = nioCoder.getEncoderIndex2a();
highHalfZoneCode = 0;
outputByte = new byte[2];
mask1 = 0xFFF8;
mask2 = 0x0007;
shift = 3;
}
/**
* flush out any residual data and reset the buffer state
*/
public int flush(byte[] output, int outStart, int outEnd)
throws MalformedInputException,
ConversionBufferFullException
{
int bytesOut;
byteOff = outStart;
if (highHalfZoneCode != 0) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
if (charState != G0) {
try {
unicodeToBuffer(composeHangul() ,output, outEnd);
}
catch(UnknownCharacterException e) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
charState = G0;
}
bytesOut = byteOff - outStart;
reset();
return bytesOut;
}
/**
* Resets converter to its initial state.
*/
public void reset() {
highHalfZoneCode = 0;
charState = G0;
charOff = byteOff = 0;
}
/**
* Returns true if the given character can be converted to the
* target character encoding.
*/
public boolean canConvert(char ch) {
int index;
int theBytes;
index = index1[((ch & mask1) >> shift)] + (ch & mask2);
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
if (theBytes != 0)
return (true);
// only return true if input char was unicode null - all others are
// undefined
return( ch == '\u0000');
}
/**
* Character conversion
*/
public int convert(char[] input, int inOff, int inEnd,
byte[] output, int outOff, int outEnd)
throws UnknownCharacterException, MalformedInputException,
ConversionBufferFullException
{
char inputChar;
int inputSize;
charOff = inOff;
byteOff = outOff;
while (charOff < inEnd) {
if (highHalfZoneCode == 0) {
inputChar = input[charOff];
inputSize = 1;
} else {
inputChar = highHalfZoneCode;
inputSize = 0;
highHalfZoneCode = 0;
}
switch (charState) {
case G0:
l = LBase;
v = VBase;
t = TBase;
if ( isLeadingC(inputChar) ) { // Leading Consonant
l = inputChar;
charState = G1;
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = inputChar;
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
break;
case G1:
if ( isLeadingC(inputChar) ) { // Leading Consonant
l = composeLL(l, inputChar);
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = inputChar;
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
case G2:
if ( isLeadingC(inputChar) ) { // Leading Consonant
unicodeToBuffer(composeHangul(), output, outEnd);
l = inputChar;
v = VBase;
t = TBase;
charState = G1;
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = composeVV(l, inputChar);
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
case G3:
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = composeTT(t, inputChar);
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
}
if (charState != G0)
charOff++;
else {
// Is this a high surrogate?
if(inputChar >= '\ud800' && inputChar <= '\udbff') {
// Is this the last character of the input?
if (charOff + inputSize >= inEnd) {
highHalfZoneCode = inputChar;
charOff += inputSize;
break;
}
// Is there a low surrogate following?
inputChar = input[charOff + inputSize];
if (inputChar >= '\udc00' && inputChar <= '\udfff') {
// We have a valid surrogate pair. Too bad we don't do
// surrogates. Is substitution enabled?
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
bytesToBuffer(outputByte, output, outEnd);
inputSize++;
} else {
badInputLength = 2;
throw new UnknownCharacterException();
}
} else {
// We have a malformed surrogate pair
badInputLength = 1;
throw new MalformedInputException();
}
}
// Is this an unaccompanied low surrogate?
else
if (inputChar >= '\uDC00' && inputChar <= '\uDFFF') {
badInputLength = 1;
throw new MalformedInputException();
} else {
unicodeToBuffer(inputChar, output, outEnd);
}
charOff += inputSize;
}
}
return byteOff - outOff;
}
private char composeHangul() {
int lIndex, vIndex, tIndex;
lIndex = l - LBase;
vIndex = v - VBase;
tIndex = t - TBase;
return (char)((lIndex * VCount + vIndex) * TCount + tIndex + SBase);
}
private char composeLL(char l1, char l2) {
return l2;
}
private char composeVV(char v1, char v2) {
return v2;
}
private char composeTT(char t1, char t2) {
return t2;
}
private boolean isLeadingC(char c) {
return (c >= LBase && c <= '\u1159');
}
private boolean isVowel(char c) {
return (c >= VBase && c <= '\u11a2');
}
private boolean isTrailingC(char c) {
return (c >= TBase && c <= '\u11f9');
}
/**
* returns the maximum number of bytes needed to convert a char
*/
public int getMaxBytesPerChar() {
return 2;
}
/**
* Return the character set ID
*/
public String getCharacterEncoding() {
return "Cp949C";
}
/**
* private function to add the bytes to the output buffer
*/
private void bytesToBuffer(byte[] theBytes, byte[] output, int outEnd)
throws ConversionBufferFullException,
UnknownCharacterException {
int spaceNeeded;
// ensure sufficient space for the bytes(s)
if (theBytes[0] == 0x00)
spaceNeeded = 1;
else
spaceNeeded = 2;
if (byteOff + spaceNeeded > outEnd)
throw new ConversionBufferFullException();
// move the data into the buffer
if (spaceNeeded == 1)
output[byteOff++] = theBytes[1];
else {
output[byteOff++] = theBytes[0];
output[byteOff++] = theBytes[1];
}
}
/**
* private function to add a unicode character to the output buffer
*/
private void unicodeToBuffer(char unicode, byte[] output, int outEnd)
throws ConversionBufferFullException,
UnknownCharacterException {
int index;
int theBytes;
// first we convert the unicode to its byte representation
index = index1[((unicode & mask1) >> shift)] + (unicode & mask2);
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
outputByte[0] = (byte)((theBytes & 0x0000ff00)>>8);
outputByte[1] = (byte)(theBytes & 0x000000ff);
// if the unicode was not mappable - look for the substitution bytes
if (outputByte[0] == 0x00 && outputByte[1] == 0x00
&& unicode != '\u0000') {
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
} else {
badInputLength = 1;
throw new UnknownCharacterException();
}
}
// now put the bytes in the buffer
bytesToBuffer(outputByte, output, outEnd);
super((DoubleByte.Encoder)new IBM949C().newEncoder());
}
}

@ -22,35 +22,19 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package sun.io;
import sun.nio.cs.ext.IBM950;
import sun.nio.cs.ext.*;
/**
* Tables and data to convert Unicode to Cp950
*
* @author Malcolm Ayres, assisted by UniMap program
*/
public class CharToByteCp950
extends CharToByteDBCS_ASCII
public class CharToByteCp950 extends CharToByteDBCS_ASCII {
{
private static IBM950 nioCoder = new IBM950();
// Return the character set id
public String getCharacterEncoding() {
return "Cp950";
}
// Return the character set id
public String getCharacterEncoding()
{
return "Cp950";
}
public CharToByteCp950()
{
super();
super.mask1 = 0xFFC0;
super.mask2 = 0x003F;
super.shift = 6;
super.index1 = nioCoder.getEncoderIndex1();
super.index2 = nioCoder.getEncoderIndex2();
super.index2a = nioCoder.getEncoderIndex2a();
}
public CharToByteCp950() {
super((DoubleByte.Encoder)new IBM950().newEncoder());
}
}

@ -24,419 +24,17 @@
*/
package sun.io;
import sun.nio.cs.ext.IBM970;
import sun.nio.cs.ext.*;
/**
* @author Malcolm Ayres
*/
// EUC_Simple is the same as DBCS_ASCII
public class CharToByteCp970 extends CharToByteDBCS_ASCII {
public class CharToByteCp970 extends CharToByteConverter
{
private static final char SBase = '\uAC00';
private static final char LBase = '\u1100';
private static final char VBase = '\u1161';
private static final char TBase = '\u11A7';
private static final int VCount = 21;
private static final int TCount = 28;
private static final byte G0 = 0;
private static final byte G1 = 1;
private static final byte G2 = 2;
private static final byte G3 = 3;
private byte charState = G0;
private char l, v, t;
private byte[] outputByte;
private char highHalfZoneCode;
private int mask1;
private int mask2;
private int shift;
private short[] index1;
private String index2;
private String index2a;
private final static IBM970 nioCoder = new IBM970();
// Return the character set id
public String getCharacterEncoding() {
return "Cp970";
}
public CharToByteCp970() {
super();
highHalfZoneCode = 0;
outputByte = new byte[2];
mask1 = 0xFFF8;
mask2 = 0x0007;
shift = 3;
index1 = nioCoder.getEncoderIndex1();
index2 = nioCoder.getEncoderIndex2();
index2a = nioCoder.getEncoderIndex2a();
super((DoubleByte.Encoder)new IBM970().newEncoder());
}
/**
* flush out any residual data and reset the buffer state
*/
public int flush(byte[] output, int outStart, int outEnd)
throws MalformedInputException,
ConversionBufferFullException
{
int bytesOut;
byteOff = outStart;
if (highHalfZoneCode != 0) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
if (charState != G0) {
try {
unicodeToBuffer(composeHangul() ,output, outEnd);
}
catch(UnknownCharacterException e) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
charState = G0;
}
bytesOut = byteOff - outStart;
reset();
return bytesOut;
}
/**
* Resets converter to its initial state.
*/
public void reset() {
highHalfZoneCode = 0;
charState = G0;
charOff = byteOff = 0;
}
/**
* Returns true if the given character can be converted to the
* target character encoding.
*/
public boolean canConvert(char ch) {
int index;
int theBytes;
index = index1[((ch & mask1) >> shift)] + (ch & mask2);
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
if (theBytes != 0)
return (true);
// only return true if input char was unicode null - all others are
// undefined
return( ch == '\u0000');
}
/**
* Character conversion
*/
public int convert(char[] input, int inOff, int inEnd,
byte[] output, int outOff, int outEnd)
throws UnknownCharacterException, MalformedInputException,
ConversionBufferFullException
{
char inputChar;
int inputSize;
charOff = inOff;
byteOff = outOff;
while (charOff < inEnd) {
if (highHalfZoneCode == 0) {
inputChar = input[charOff];
inputSize = 1;
} else {
inputChar = highHalfZoneCode;
inputSize = 0;
highHalfZoneCode = 0;
}
switch (charState) {
case G0:
l = LBase;
v = VBase;
t = TBase;
if ( isLeadingC(inputChar) ) { // Leading Consonant
l = inputChar;
charState = G1;
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = inputChar;
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
break;
case G1:
if ( isLeadingC(inputChar) ) { // Leading Consonant
l = composeLL(l, inputChar);
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = inputChar;
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
case G2:
if ( isLeadingC(inputChar) ) { // Leading Consonant
unicodeToBuffer(composeHangul(), output, outEnd);
l = inputChar;
v = VBase;
t = TBase;
charState = G1;
break;
}
if ( isVowel(inputChar) ) { // Vowel
v = composeVV(l, inputChar);
charState = G2;
break;
}
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = inputChar;
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
case G3:
if ( isTrailingC(inputChar) ) { // Trailing Consonant
t = composeTT(t, inputChar);
charState = G3;
break;
}
unicodeToBuffer(composeHangul(), output, outEnd);
charState = G0;
break;
}
if (charState != G0)
charOff++;
else {
// Is this a high surrogate?
if(inputChar >= '\ud800' && inputChar <= '\udbff') {
// Is this the last character of the input?
if (charOff + inputSize >= inEnd) {
highHalfZoneCode = inputChar;
charOff += inputSize;
break;
}
// Is there a low surrogate following?
inputChar = input[charOff + inputSize];
if (inputChar >= '\udc00' && inputChar <= '\udfff') {
// We have a valid surrogate pair. Too bad we don't do
// surrogates. Is substitution enabled?
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
bytesToBuffer(outputByte, output, outEnd);
inputSize++;
} else {
badInputLength = 2;
throw new UnknownCharacterException();
}
} else {
// We have a malformed surrogate pair
badInputLength = 1;
throw new MalformedInputException();
}
}
// Is this an unaccompanied low surrogate?
else
if (inputChar >= '\uDC00' && inputChar <= '\uDFFF') {
badInputLength = 1;
throw new MalformedInputException();
} else {
unicodeToBuffer(inputChar, output, outEnd);
}
charOff += inputSize;
}
}
return byteOff - outOff;
}
private char composeHangul() {
int lIndex, vIndex, tIndex;
lIndex = l - LBase;
vIndex = v - VBase;
tIndex = t - TBase;
return (char)((lIndex * VCount + vIndex) * TCount + tIndex + SBase);
}
private char composeLL(char l1, char l2) {
return l2;
}
private char composeVV(char v1, char v2) {
return v2;
}
private char composeTT(char t1, char t2) {
return t2;
}
private boolean isLeadingC(char c) {
return (c >= LBase && c <= '\u1159');
}
private boolean isVowel(char c) {
return (c >= VBase && c <= '\u11a2');
}
private boolean isTrailingC(char c) {
return (c >= TBase && c <= '\u11f9');
}
/**
* returns the maximum number of bytes needed to convert a char
*/
public int getMaxBytesPerChar() {
return 2;
}
/**
* Return the character set ID
*/
public String getCharacterEncoding() {
return "Cp970";
}
/**
* private function to add the bytes to the output buffer
*/
private void bytesToBuffer(byte[] theBytes, byte[] output, int outEnd)
throws ConversionBufferFullException,
UnknownCharacterException {
int spaceNeeded;
// ensure sufficient space for the bytes(s)
if (theBytes[0] == 0x00)
spaceNeeded = 1;
else
spaceNeeded = 2;
if (byteOff + spaceNeeded > outEnd)
throw new ConversionBufferFullException();
// move the data into the buffer
if (spaceNeeded == 1)
output[byteOff++] = theBytes[1];
else {
output[byteOff++] = theBytes[0];
output[byteOff++] = theBytes[1];
}
}
/**
* private function to add a unicode character to the output buffer
*/
private void unicodeToBuffer(char unicode, byte[] output, int outEnd)
throws ConversionBufferFullException,
UnknownCharacterException {
int index;
int theBytes;
// first we convert the unicode to its byte representation
index = index1[((unicode & mask1) >> shift)] + (unicode & mask2);
if (index < 15000) {
theBytes = (int)(index2.charAt(index));
} else {
theBytes = (int)(index2a.charAt(index-15000));
}
outputByte[0] = (byte)((theBytes & 0x0000ff00)>>8);
outputByte[1] = (byte)(theBytes & 0x000000ff);
// if the unicode was not mappable - look for the substitution bytes
if (outputByte[0] == 0x00 && outputByte[1] == 0x00
&& unicode != '\u0000') {
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
} else {
badInputLength = 1;
throw new UnknownCharacterException();
}
}
// now put the bytes in the buffer
bytesToBuffer(outputByte, output, outEnd);
}
}

@ -24,18 +24,26 @@
*/
package sun.io;
import sun.nio.cs.Surrogate;
import sun.nio.cs.ext.DoubleByte;
import static sun.nio.cs.CharsetMapping.*;
public abstract class CharToByteDBCS_ASCII extends CharToByteConverter
{
private char highHalfZoneCode;
private byte[] outputByte = new byte[2];
protected short index1[];
protected String index2;
protected String index2a;
protected int mask1;
protected int mask2;
protected int shift;
private DoubleByte.Encoder enc;
public CharToByteDBCS_ASCII(DoubleByte.Encoder enc) {
super();
this.enc = enc;
}
int encodeChar(char c) {
return enc.encodeChar(c);
}
/**
* flush out any residual data and reset the buffer state
@ -69,112 +77,97 @@ public abstract class CharToByteDBCS_ASCII extends CharToByteConverter
charOff = inOff;
while(charOff < inEnd) {
int index;
int theBytes;
int spaceNeeded;
int index;
int theBytes;
int spaceNeeded;
if (highHalfZoneCode == 0) {
inputChar = input[charOff];
inputSize = 1;
} else {
inputChar = highHalfZoneCode;
inputSize = 0;
highHalfZoneCode = 0;
}
if (highHalfZoneCode == 0) {
inputChar = input[charOff];
inputSize = 1;
} else {
inputChar = highHalfZoneCode;
inputSize = 0;
highHalfZoneCode = 0;
}
// Is this a high surrogate?
if (Surrogate.isHigh(inputChar)) {
// Is this the last character of the input?
if (charOff + inputSize >= inEnd) {
highHalfZoneCode = inputChar;
charOff += inputSize;
break;
}
// Is this a high surrogate?
if(inputChar >= '\ud800' && inputChar <= '\udbff') {
// Is this the last character of the input?
if (charOff + inputSize >= inEnd) {
highHalfZoneCode = inputChar;
charOff += inputSize;
break;
}
// Is there a low surrogate following?
inputChar = input[charOff + inputSize];
if (inputChar >= '\udc00' && inputChar <= '\udfff') {
// We have a valid surrogate pair. Too bad we don't do
// surrogates. Is substitution enabled?
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
// Is there a low surrogate following?
inputChar = input[charOff + inputSize];
if (Surrogate.isLow(inputChar)) {
// We have a valid surrogate pair. Too bad we don't do
// surrogates. Is substitution enabled?
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
}
else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
inputSize++;
} else {
badInputLength = 2;
throw new UnknownCharacterException();
}
else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
inputSize++;
} else {
badInputLength = 2;
throw new UnknownCharacterException();
// We have a malformed surrogate pair
badInputLength = 1;
throw new MalformedInputException();
}
} else {
// We have a malformed surrogate pair
badInputLength = 1;
throw new MalformedInputException();
}
}
// Is this an unaccompanied low surrogate?
else
if (inputChar >= '\uDC00' && inputChar <= '\uDFFF') {
badInputLength = 1;
throw new MalformedInputException();
} else {
// We have a valid character, get the bytes for it
index = index1[((inputChar & mask1) >> shift)] + (inputChar & mask2);
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
outputByte[0] = (byte)((theBytes & 0x0000ff00)>>8);
outputByte[1] = (byte)(theBytes & 0x000000ff);
}
// if there was no mapping - look for substitution characters
if (outputByte[0] == 0x00 && outputByte[1] == 0x00
&& inputChar != '\u0000')
{
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
} else {
}
// Is this an unaccompanied low surrogate?
else if (Surrogate.isLow(inputChar)) {
badInputLength = 1;
throw new UnknownCharacterException();
}
}
throw new MalformedInputException();
} else {
if (outputByte[0] == 0x00)
spaceNeeded = 1;
else
spaceNeeded = 2;
// We have a valid character, get the bytes for it
theBytes = encodeChar(inputChar);
if (theBytes == UNMAPPABLE_ENCODING) {
// if there was no mapping - look for substitution characters
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
} else {
badInputLength = 1;
throw new UnknownCharacterException();
}
} else {
outputByte[0] = (byte)(theBytes >>8);
outputByte[1] = (byte)theBytes;
}
}
if (outputByte[0] == 0x00)
spaceNeeded = 1;
else
spaceNeeded = 2;
if (byteOff + spaceNeeded > outEnd)
throw new ConversionBufferFullException();
if (byteOff + spaceNeeded > outEnd)
throw new ConversionBufferFullException();
if (spaceNeeded == 1)
output[byteOff++] = outputByte[1];
else {
output[byteOff++] = outputByte[0];
output[byteOff++] = outputByte[1];
}
if (spaceNeeded == 1)
output[byteOff++] = outputByte[1];
else {
output[byteOff++] = outputByte[0];
output[byteOff++] = outputByte[1];
}
charOff += inputSize;
charOff += inputSize;
}
return byteOff - outOff;
}
@ -193,28 +186,11 @@ public abstract class CharToByteDBCS_ASCII extends CharToByteConverter
return 2;
}
/**
* Returns true if the given character can be converted to the
* target character encoding.
*/
public boolean canConvert(char ch) {
int index;
int theBytes;
index = index1[((ch & mask1) >> shift)] + (ch & mask2);
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
if (theBytes != 0)
return (true);
// only return true if input char was unicode null - all others are
// undefined
return( ch == '\u0000');
public boolean canConvert(char c) {
return encodeChar(c) != UNMAPPABLE_ENCODING;
}
}

@ -24,9 +24,12 @@
*/
package sun.io;
import sun.nio.cs.Surrogate;
import sun.nio.cs.ext.DoubleByte;
import static sun.nio.cs.CharsetMapping.*;
public abstract class CharToByteDBCS_EBCDIC extends CharToByteConverter
{
private static final int SBCS = 0;
private static final int DBCS = 1;
@ -37,18 +40,17 @@ public abstract class CharToByteDBCS_EBCDIC extends CharToByteConverter
private char highHalfZoneCode;
private byte[] outputByte = new byte[2];
protected short index1[];
protected String index2;
protected String index2a;
protected int mask1;
protected int mask2;
protected int shift;
private DoubleByte.Encoder enc;
public CharToByteDBCS_EBCDIC() {
public CharToByteDBCS_EBCDIC(DoubleByte.Encoder enc) {
super();
highHalfZoneCode = 0;
currentState = SBCS;
this.enc = enc;
}
int encodeChar(char c) {
return enc.encodeChar(c);
}
/**
@ -106,7 +108,7 @@ public abstract class CharToByteDBCS_EBCDIC extends CharToByteConverter
}
// Is this a high surrogate?
if(inputChar >= '\ud800' && inputChar <= '\udbff') {
if (Surrogate.isHigh(inputChar)) {
// Is this the last character of the input?
if (charOff + inputSize >= inEnd) {
highHalfZoneCode = inputChar;
@ -116,8 +118,7 @@ public abstract class CharToByteDBCS_EBCDIC extends CharToByteConverter
// Is there a low surrogate following?
inputChar = input[charOff + inputSize];
if (inputChar >= '\udc00' && inputChar <= '\udfff') {
if (Surrogate.isLow(inputChar)) {
// We have a valid surrogate pair. Too bad we don't do
// surrogates. Is substitution enabled?
if (subMode) {
@ -129,58 +130,45 @@ public abstract class CharToByteDBCS_EBCDIC extends CharToByteConverter
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
inputSize++;
} else {
badInputLength = 2;
throw new UnknownCharacterException();
}
} else {
// We have a malformed surrogate pair
badInputLength = 1;
throw new MalformedInputException();
}
}
// Is this an unaccompanied low surrogate?
else
if (inputChar >= '\uDC00' && inputChar <= '\uDFFF') {
badInputLength = 1;
throw new MalformedInputException();
} else {
else if (Surrogate.isLow(inputChar)) {
badInputLength = 1;
throw new MalformedInputException();
} else {
// We have a valid character, get the bytes for it
index = index1[((inputChar & mask1) >> shift)] + (inputChar & mask2);
//System.out.println("Index for U+" + Integer.toHexString(inputChar) + " = " + index); // for debugging purposes
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
outputByte[0] = (byte)((theBytes & 0x0000ff00)>>8);
outputByte[1] = (byte)(theBytes & 0x000000ff);
}
// if there was no mapping - look for substitution characters
if (outputByte[0] == 0x00 && outputByte[1] == 0x00
&& inputChar != '\u0000')
{
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
} else {
badInputLength = 1;
throw new UnknownCharacterException();
}
// We have a valid character, get the bytes for it
theBytes = encodeChar(inputChar);
if (theBytes == UNMAPPABLE_ENCODING) {
// if there was no mapping - look for substitution characters
if (subMode) {
if (subBytes.length == 1) {
outputByte[0] = 0x00;
outputByte[1] = subBytes[0];
} else {
outputByte[0] = subBytes[0];
outputByte[1] = subBytes[1];
}
} else {
badInputLength = 1;
throw new UnknownCharacterException();
}
} else {
outputByte[0] = (byte)((theBytes & 0x0000ff00)>>8);
outputByte[1] = (byte)(theBytes & 0x000000ff);
}
}
//Set the output buffer into the correct state
if (currentState == DBCS && outputByte[0] == 0x00) {
@ -215,7 +203,6 @@ public abstract class CharToByteDBCS_EBCDIC extends CharToByteConverter
charOff += inputSize;
}
return byteOff - outOff;
}
@ -257,28 +244,11 @@ public abstract class CharToByteDBCS_EBCDIC extends CharToByteConverter
}
/**
* Returns true if the given character can be converted to the
* target character encoding.
*/
public boolean canConvert(char ch) {
int index;
int theBytes;
index = index1[((ch & mask1) >> shift)] + (ch & mask2);
if (index < 15000)
theBytes = (int)(index2.charAt(index));
else
theBytes = (int)(index2a.charAt(index-15000));
if (theBytes != 0)
return (true);
// only return true if input char was unicode null - all others are
// undefined
return( ch == '\u0000');
public boolean canConvert(char c) {
return encodeChar(c) != UNMAPPABLE_ENCODING;
}
}

@ -0,0 +1,739 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package sun.nio.cs.ext;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
import java.util.Arrays;
import sun.nio.cs.Surrogate;
import static sun.nio.cs.CharsetMapping.*;
/*
* Four types of "DoubleByte" charsets are implemented in this class
* (1)DoubleByte
* The "mostly widely used" multibyte charset, a combination of
* a singlebyte character set (usually the ASCII charset) and a
* doublebyte character set. The codepoint values of singlebyte
* and doublebyte don't overlap. Microsoft's multibyte charsets
* and IBM's "DBCS_ASCII" charsets, such as IBM1381, 942, 943,
* 948, 949 and 950 are such charsets.
*
* (2)DoubleByte_EBCDIC
* IBM EBCDIC Mix multibyte charset. Use SO and SI to shift (switch)
* in and out between the singlebyte character set and doublebyte
* character set.
*
* (3)DoubleByte_SIMPLE_EUC
* It's a "simple" form of EUC encoding scheme, only have the
* singlebyte character set G0 and one doublebyte character set
* G1 are defined, G2 (with SS2) and G3 (with SS3) are not used.
* So it is actually the same as the "typical" type (1) mentioned
* above, except it return "malformed" for the SS2 and SS3 when
* decoding.
*
* (4)DoubleByte ONLY
* A "pure" doublebyte only character set. From implementation
* point of view, this is the type (1) with "decodeSingle" always
* returns unmappable.
*
* For simplicity, all implementations share the same decoding and
* encoding data structure.
*
* Decoding:
*
* char[][] b2c;
* char[] b2cSB;
* int b2Min, b2Max
*
* public char decodeSingle(int b) {
* return b2cSB.[b];
* }
*
* public char decodeDouble(int b1, int b2) {
* if (b2 < b2Min || b2 > b2Max)
* return UNMAPPABLE_DECODING;
* return b2c[b1][b2 - b2Min];
* }
*
* (1)b2Min, b2Max are the corresponding min and max value of the
* low-half of the double-byte.
* (2)The high 8-bit/b1 of the double-byte are used to indexed into
* b2c array.
*
* Encoding:
*
* char[] c2b;
* char[] c2bIndex;
*
* public int encodeChar(char ch) {
* return c2b[c2bIndex[ch >> 8] + (ch & 0xff)];
* }
*
*/
public class DoubleByte {
public final static char[] B2C_UNMAPPABLE;
static {
B2C_UNMAPPABLE = new char[0x100];
Arrays.fill(B2C_UNMAPPABLE, (char)UNMAPPABLE_DECODING);
}
public static class Decoder extends CharsetDecoder {
final char[][] b2c;
final char[] b2cSB;
final int b2Min;
final int b2Max;
// for SimpleEUC override
protected CoderResult crMalformedOrUnderFlow(int b) {
return CoderResult.UNDERFLOW;
}
protected CoderResult crMalformedOrUnmappable(int b) {
return CoderResult.unmappableForLength(2);
}
Decoder(Charset cs, float avgcpb, float maxcpb,
char[][] b2c, char[] b2cSB,
int b2Min, int b2Max) {
super(cs, avgcpb, maxcpb);
this.b2c = b2c;
this.b2cSB = b2cSB;
this.b2Min = b2Min;
this.b2Max = b2Max;
}
Decoder(Charset cs, char[][] b2c, char[] b2cSB, int b2Min, int b2Max) {
this(cs, 0.5f, 1.0f, b2c, b2cSB, b2Min, b2Max);
}
protected CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {
byte[] sa = src.array();
int sp = src.arrayOffset() + src.position();
int sl = src.arrayOffset() + src.limit();
char[] da = dst.array();
int dp = dst.arrayOffset() + dst.position();
int dl = dst.arrayOffset() + dst.limit();
try {
while (sp < sl && dp < dl) {
// inline the decodeSingle/Double() for better performance
int inSize = 1;
int b1 = sa[sp] & 0xff;
char c = b2cSB[b1];
if (c == UNMAPPABLE_DECODING) {
if (sl - sp < 2)
return crMalformedOrUnderFlow(b1);
int b2 = sa[sp + 1] & 0xff;
if (b2 < b2Min || b2 > b2Max ||
(c = b2c[b1][b2 - b2Min]) == UNMAPPABLE_DECODING) {
return crMalformedOrUnmappable(b1);
}
inSize++;
}
da[dp++] = c;
sp += inSize;
}
return (sp >= sl) ? CoderResult.UNDERFLOW
: CoderResult.OVERFLOW;
} finally {
src.position(sp - src.arrayOffset());
dst.position(dp - dst.arrayOffset());
}
}
protected CoderResult decodeBufferLoop(ByteBuffer src, CharBuffer dst) {
int mark = src.position();
try {
while (src.hasRemaining() && dst.hasRemaining()) {
int b1 = src.get() & 0xff;
char c = b2cSB[b1];
int inSize = 1;
if (c == UNMAPPABLE_DECODING) {
if (src.remaining() < 1)
return crMalformedOrUnderFlow(b1);
int b2 = src.get() & 0xff;
if (b2 < b2Min || b2 > b2Max ||
(c = b2c[b1][b2 - b2Min]) == UNMAPPABLE_DECODING)
return crMalformedOrUnmappable(b1);
inSize++;
}
dst.put(c);
mark += inSize;
}
return src.hasRemaining()? CoderResult.OVERFLOW
: CoderResult.UNDERFLOW;
} finally {
src.position(mark);
}
}
protected CoderResult decodeLoop(ByteBuffer src, CharBuffer dst) {
if (src.hasArray() && dst.hasArray())
return decodeArrayLoop(src, dst);
else
return decodeBufferLoop(src, dst);
}
// decode loops are not using decodeSingle/Double() for performance
// reason.
public char decodeSingle(int b) {
return b2cSB[b];
}
public char decodeDouble(int b1, int b2) {
if (b2 < b2Min || b2 > b2Max)
return UNMAPPABLE_DECODING;
return b2c[b1][b2 - b2Min];
}
}
// IBM_EBCDIC_DBCS
public static class Decoder_EBCDIC extends Decoder {
private static final int SBCS = 0;
private static final int DBCS = 1;
private static final int SO = 0x0e;
private static final int SI = 0x0f;
private int currentState;
Decoder_EBCDIC(Charset cs,
char[][] b2c, char[] b2cSB, int b2Min, int b2Max) {
super(cs, b2c, b2cSB, b2Min, b2Max);
}
protected void implReset() {
currentState = SBCS;
}
// Check validity of dbcs ebcdic byte pair values
//
// First byte : 0x41 -- 0xFE
// Second byte: 0x41 -- 0xFE
// Doublebyte blank: 0x4040
//
// The validation implementation in "old" DBCS_IBM_EBCDIC and sun.io
// as
// if ((b1 != 0x40 || b2 != 0x40) &&
// (b2 < 0x41 || b2 > 0xfe)) {...}
// is not correct/complete (range check for b1)
//
private static boolean isDoubleByte(int b1, int b2) {
return (0x41 <= b1 && b1 <= 0xfe && 0x41 <= b2 && b2 <= 0xfe)
|| (b1 == 0x40 && b2 == 0x40); // DBCS-HOST SPACE
}
protected CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {
byte[] sa = src.array();
int sp = src.arrayOffset() + src.position();
int sl = src.arrayOffset() + src.limit();
char[] da = dst.array();
int dp = dst.arrayOffset() + dst.position();
int dl = dst.arrayOffset() + dst.limit();
try {
// don't check dp/dl together here, it's possible to
// decdoe a SO/SI without space in output buffer.
while (sp < sl) {
int b1 = sa[sp] & 0xff;
int inSize = 1;
if (b1 == SO) { // Shift out
if (currentState != SBCS)
return CoderResult.malformedForLength(1);
else
currentState = DBCS;
} else if (b1 == SI) {
if (currentState != DBCS)
return CoderResult.malformedForLength(1);
else
currentState = SBCS;
} else {
char c = UNMAPPABLE_DECODING;
if (currentState == SBCS) {
c = b2cSB[b1];
if (c == UNMAPPABLE_DECODING)
return CoderResult.unmappableForLength(1);
} else {
if (sl - sp < 2)
return CoderResult.UNDERFLOW;
int b2 = sa[sp + 1] & 0xff;
if (b2 < b2Min || b2 > b2Max ||
(c = b2c[b1][b2 - b2Min]) == UNMAPPABLE_DECODING) {
if (!isDoubleByte(b1, b2))
return CoderResult.malformedForLength(2);
return CoderResult.unmappableForLength(2);
}
inSize++;
}
if (dl - dp < 1)
return CoderResult.OVERFLOW;
da[dp++] = c;
}
sp += inSize;
}
return CoderResult.UNDERFLOW;
} finally {
src.position(sp - src.arrayOffset());
dst.position(dp - dst.arrayOffset());
}
}
protected CoderResult decodeBufferLoop(ByteBuffer src, CharBuffer dst) {
int mark = src.position();
try {
while (src.hasRemaining()) {
int b1 = src.get() & 0xff;
int inSize = 1;
if (b1 == SO) { // Shift out
if (currentState != SBCS)
return CoderResult.malformedForLength(1);
else
currentState = DBCS;
} else if (b1 == SI) {
if (currentState != DBCS)
return CoderResult.malformedForLength(1);
else
currentState = SBCS;
} else {
char c = UNMAPPABLE_DECODING;
if (currentState == SBCS) {
c = b2cSB[b1];
if (c == UNMAPPABLE_DECODING)
return CoderResult.unmappableForLength(1);
} else {
if (src.remaining() < 1)
return CoderResult.UNDERFLOW;
int b2 = src.get()&0xff;
if (b2 < b2Min || b2 > b2Max ||
(c = b2c[b1][b2 - b2Min]) == UNMAPPABLE_DECODING) {
if (!isDoubleByte(b1, b2))
return CoderResult.malformedForLength(2);
return CoderResult.unmappableForLength(2);
}
inSize++;
}
if (dst.remaining() < 1)
return CoderResult.OVERFLOW;
dst.put(c);
}
mark += inSize;
}
return CoderResult.UNDERFLOW;
} finally {
src.position(mark);
}
}
}
// EBCDIC_DBCS_ONLY
public static class Decoder_EBCDIC_DBCSONLY extends Decoder {
static final char[] b2cSB;
static {
b2cSB = new char[0x100];
Arrays.fill(b2cSB, (char)UNMAPPABLE_DECODING);
}
Decoder_EBCDIC_DBCSONLY(Charset cs, char[][] b2c, int b2Min, int b2Max) {
super(cs, 0.5f, 1.0f, b2c, b2cSB, b2Min, b2Max);
}
}
// EUC_SIMPLE
// The only thing we need to "override" is to check SS2/SS3 and
// return "malformed" if found
public static class Decoder_EUC_SIM extends Decoder {
private final int SS2 = 0x8E;
private final int SS3 = 0x8F;
Decoder_EUC_SIM(Charset cs,
char[][] b2c, char[] b2cSB, int b2Min, int b2Max) {
super(cs, b2c, b2cSB, b2Min, b2Max);
}
// No support provided for G2/G3 for SimpleEUC
protected CoderResult crMalformedOrUnderFlow(int b) {
if (b == SS2 || b == SS3 )
return CoderResult.malformedForLength(1);
return CoderResult.UNDERFLOW;
}
protected CoderResult crMalformedOrUnmappable(int b) {
if (b == SS2 || b == SS3 )
return CoderResult.malformedForLength(1);
return CoderResult.unmappableForLength(2);
}
}
public static class Encoder extends CharsetEncoder {
final int MAX_SINGLEBYTE = 0xff;
private final char[] c2b;
private final char[] c2bIndex;
Surrogate.Parser sgp;
Encoder(Charset cs, char[] c2b, char[] c2bIndex) {
super(cs, 2.0f, 2.0f);
this.c2b = c2b;
this.c2bIndex = c2bIndex;
}
Encoder(Charset cs, float avg, float max, byte[] repl, char[] c2b, char[] c2bIndex) {
super(cs, avg, max, repl);
this.c2b = c2b;
this.c2bIndex = c2bIndex;
}
public boolean canEncode(char c) {
return encodeChar(c) != UNMAPPABLE_ENCODING;
}
Surrogate.Parser sgp() {
if (sgp == null)
sgp = new Surrogate.Parser();
return sgp;
}
protected CoderResult encodeArrayLoop(CharBuffer src, ByteBuffer dst) {
char[] sa = src.array();
int sp = src.arrayOffset() + src.position();
int sl = src.arrayOffset() + src.limit();
byte[] da = dst.array();
int dp = dst.arrayOffset() + dst.position();
int dl = dst.arrayOffset() + dst.limit();
try {
while (sp < sl) {
char c = sa[sp];
int bb = encodeChar(c);
if (bb == UNMAPPABLE_ENCODING) {
if (Surrogate.is(c)) {
if (sgp().parse(c, sa, sp, sl) < 0)
return sgp.error();
return sgp.unmappableResult();
}
return CoderResult.unmappableForLength(1);
}
if (bb > MAX_SINGLEBYTE) { // DoubleByte
if (dl - dp < 2)
return CoderResult.OVERFLOW;
da[dp++] = (byte)(bb >> 8);
da[dp++] = (byte)bb;
} else { // SingleByte
if (dl - dp < 1)
return CoderResult.OVERFLOW;
da[dp++] = (byte)bb;
}
sp++;
}
return CoderResult.UNDERFLOW;
} finally {
src.position(sp - src.arrayOffset());
dst.position(dp - dst.arrayOffset());
}
}
protected CoderResult encodeBufferLoop(CharBuffer src, ByteBuffer dst) {
int mark = src.position();
try {
while (src.hasRemaining()) {
char c = src.get();
int bb = encodeChar(c);
if (bb == UNMAPPABLE_ENCODING) {
if (Surrogate.is(c)) {
if (sgp().parse(c, src) < 0)
return sgp.error();
return sgp.unmappableResult();
}
return CoderResult.unmappableForLength(1);
}
if (bb > MAX_SINGLEBYTE) { // DoubleByte
if (dst.remaining() < 2)
return CoderResult.OVERFLOW;
dst.put((byte)(bb >> 8));
dst.put((byte)(bb));
} else {
if (dst.remaining() < 1)
return CoderResult.OVERFLOW;
dst.put((byte)bb);
}
mark++;
}
return CoderResult.UNDERFLOW;
} finally {
src.position(mark);
}
}
protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst) {
if (src.hasArray() && dst.hasArray())
return encodeArrayLoop(src, dst);
else
return encodeBufferLoop(src, dst);
}
public int encodeChar(char ch) {
return c2b[c2bIndex[ch >> 8] + (ch & 0xff)];
}
// init the c2b and c2bIndex tables from b2c.
static void initC2B(String[] b2c, String b2cSB, String b2cNR, String c2bNR,
int b2Min, int b2Max,
char[] c2b, char[] c2bIndex)
{
Arrays.fill(c2b, (char)UNMAPPABLE_ENCODING);
int off = 0x100;
char[][] b2c_ca = new char[b2c.length][];
char[] b2cSB_ca = null;
if (b2cSB != null)
b2cSB_ca = b2cSB.toCharArray();
for (int i = 0; i < b2c.length; i++) {
if (b2c[i] == null)
continue;
b2c_ca[i] = b2c[i].toCharArray();
}
if (b2cNR != null) {
int j = 0;
while (j < b2cNR.length()) {
char b = b2cNR.charAt(j++);
char c = b2cNR.charAt(j++);
if (b < 0x100 && b2cSB_ca != null) {
if (b2cSB_ca[b] == c)
b2cSB_ca[b] = UNMAPPABLE_DECODING;
} else {
if (b2c_ca[b >> 8][(b & 0xff) - b2Min] == c)
b2c_ca[b >> 8][(b & 0xff) - b2Min] = UNMAPPABLE_DECODING;
}
}
}
if (b2cSB_ca != null) { // SingleByte
for (int b = 0; b < b2cSB_ca.length; b++) {
char c = b2cSB_ca[b];
if (c == UNMAPPABLE_DECODING)
continue;
int index = c2bIndex[c >> 8];
if (index == 0) {
index = off;
off += 0x100;
c2bIndex[c >> 8] = (char)index;
}
c2b[index + (c & 0xff)] = (char)b;
}
}
for (int b1 = 0; b1 < b2c.length; b1++) { // DoubleByte
char[] db = b2c_ca[b1];
if (db == null)
continue;
for (int b2 = b2Min; b2 <= b2Max; b2++) {
char c = db[b2 - b2Min];
if (c == UNMAPPABLE_DECODING)
continue;
int index = c2bIndex[c >> 8];
if (index == 0) {
index = off;
off += 0x100;
c2bIndex[c >> 8] = (char)index;
}
c2b[index + (c & 0xff)] = (char)((b1 << 8) | b2);
}
}
if (c2bNR != null) {
// add c->b only nr entries
for (int i = 0; i < c2bNR.length(); i += 2) {
char b = c2bNR.charAt(i);
char c = c2bNR.charAt(i + 1);
int index = (c >> 8);
if (c2bIndex[index] == 0) {
c2bIndex[index] = (char)off;
off += 0x100;
}
index = c2bIndex[index] + (c & 0xff);
c2b[index] = b;
}
}
}
}
// EBCDIC_DBCS_ONLY
public static class Encoder_EBCDIC_DBCSONLY extends Encoder {
Encoder_EBCDIC_DBCSONLY(Charset cs, byte[] repl,
char[] c2b, char[] c2bIndex) {
super(cs, 2.0f, 2.0f, repl, c2b, c2bIndex);
}
public int encodeChar(char ch) {
int bb = super.encodeChar(ch);
if (bb <= MAX_SINGLEBYTE)
return UNMAPPABLE_ENCODING;
return bb;
}
}
// for IBM_EBCDIC_DBCS
public static class Encoder_EBCDIC extends Encoder {
static final int SBCS = 0;
static final int DBCS = 1;
static final byte SO = 0x0e;
static final byte SI = 0x0f;
protected int currentState = SBCS;
Encoder_EBCDIC(Charset cs, char[] c2b, char[] c2bIndex) {
super(cs, 4.0f, 5.0f, new byte[] {(byte)0x6f}, c2b, c2bIndex);
}
protected void implReset() {
currentState = SBCS;
}
protected CoderResult implFlush(ByteBuffer out) {
if (currentState == DBCS) {
if (out.remaining() < 1)
return CoderResult.OVERFLOW;
out.put(SI);
}
implReset();
return CoderResult.UNDERFLOW;
}
protected CoderResult encodeArrayLoop(CharBuffer src, ByteBuffer dst) {
char[] sa = src.array();
int sp = src.arrayOffset() + src.position();
int sl = src.arrayOffset() + src.limit();
byte[] da = dst.array();
int dp = dst.arrayOffset() + dst.position();
int dl = dst.arrayOffset() + dst.limit();
try {
while (sp < sl) {
char c = sa[sp];
int bb = encodeChar(c);
if (bb == UNMAPPABLE_ENCODING) {
if (Surrogate.is(c)) {
if (sgp().parse(c, sa, sp, sl) < 0)
return sgp.error();
return sgp.unmappableResult();
}
return CoderResult.unmappableForLength(1);
}
if (bb > MAX_SINGLEBYTE) { // DoubleByte
if (currentState == SBCS) {
if (dl - dp < 1)
return CoderResult.OVERFLOW;
currentState = DBCS;
da[dp++] = SO;
}
if (dl - dp < 2)
return CoderResult.OVERFLOW;
da[dp++] = (byte)(bb >> 8);
da[dp++] = (byte)bb;
} else { // SingleByte
if (currentState == DBCS) {
if (dl - dp < 1)
return CoderResult.OVERFLOW;
currentState = SBCS;
da[dp++] = SI;
}
if (dl - dp < 1)
return CoderResult.OVERFLOW;
da[dp++] = (byte)bb;
}
sp++;
}
return CoderResult.UNDERFLOW;
} finally {
src.position(sp - src.arrayOffset());
dst.position(dp - dst.arrayOffset());
}
}
protected CoderResult encodeBufferLoop(CharBuffer src, ByteBuffer dst) {
int mark = src.position();
try {
while (src.hasRemaining()) {
char c = src.get();
int bb = encodeChar(c);
if (bb == UNMAPPABLE_ENCODING) {
if (Surrogate.is(c)) {
if (sgp().parse(c, src) < 0)
return sgp.error();
return sgp.unmappableResult();
}
return CoderResult.unmappableForLength(1);
}
if (bb > MAX_SINGLEBYTE) { // DoubleByte
if (currentState == SBCS) {
if (dst.remaining() < 1)
return CoderResult.OVERFLOW;
currentState = DBCS;
dst.put(SO);
}
if (dst.remaining() < 2)
return CoderResult.OVERFLOW;
dst.put((byte)(bb >> 8));
dst.put((byte)(bb));
} else { // Single-byte
if (currentState == DBCS) {
if (dst.remaining() < 1)
return CoderResult.OVERFLOW;
currentState = SBCS;
dst.put(SI);
}
if (dst.remaining() < 1)
return CoderResult.OVERFLOW;
dst.put((byte)bb);
}
mark++;
}
return CoderResult.UNDERFLOW;
} finally {
src.position(mark);
}
}
}
// EUC_SIMPLE
public static class Encoder_EUC_SIM extends Encoder {
Encoder_EUC_SIM(Charset cs, char[] c2b, char[] c2bIndex) {
super(cs, c2b, c2bIndex);
}
}
}

@ -34,10 +34,10 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
import static sun.nio.cs.CharsetMapping.*;
// EBCDIC DBCS-only Korean
public class IBM834
extends Charset
public class IBM834 extends Charset
{
public IBM834() {
super("x-IBM834", ExtendedCharsets.aliasesFor("x-IBM834"));
@ -48,60 +48,42 @@ public class IBM834
}
public CharsetDecoder newDecoder() {
return new Decoder(this);
IBM933.initb2c();
return new DoubleByte.Decoder_EBCDIC_DBCSONLY(
this, IBM933.b2c, 0x40, 0xfe); // hardcode the b2min/max
}
public CharsetEncoder newEncoder() {
IBM933.initc2b();
return new Encoder(this);
}
protected static class Decoder extends DBCS_ONLY_IBM_EBCDIC_Decoder {
public Decoder(Charset cs) {
super(cs);
super.mask1 = 0xFFF0;
super.mask2 = 0x000F;
super.shift = 4;
super.index1 = IBM933.getDecoderIndex1();
super.index2 = IBM933.getDecoderIndex2();
}
}
protected static class Encoder extends IBM933.Encoder {
protected static class Encoder extends DoubleByte.Encoder_EBCDIC_DBCSONLY {
public Encoder(Charset cs) {
super(cs, new byte[] {(byte)0xfe, (byte)0xfe}, false);
super(cs, new byte[] {(byte)0xfe, (byte)0xfe},
IBM933.c2b, IBM933.c2bIndex);
}
protected CoderResult implFlush(ByteBuffer out) {
implReset();
return CoderResult.UNDERFLOW;
}
protected byte[] encodeHangul(char ch) {
byte[] bytes = super.encodeHangul(ch);
if (bytes.length == 0) {
public int encodeChar(char ch) {
int bb = super.encodeChar(ch);
if (bb == UNMAPPABLE_ENCODING) {
// Cp834 has 6 additional non-roundtrip char->bytes
// mappings, see#6379808
if (ch == '\u00b7') {
return new byte[] {(byte)0x41, (byte)0x43 };
return 0x4143;
} else if (ch == '\u00ad') {
return new byte[] {(byte)0x41, (byte)0x48 };
return 0x4148;
} else if (ch == '\u2015') {
return new byte[] {(byte)0x41, (byte)0x49 };
return 0x4149;
} else if (ch == '\u223c') {
return new byte[] {(byte)0x42, (byte)0xa1 };
return 0x42a1;
} else if (ch == '\uff5e') {
return new byte[] {(byte)0x49, (byte)0x54 };
return 0x4954;
} else if (ch == '\u2299') {
return new byte[] {(byte)0x49, (byte)0x6f };
return 0x496f;
}
} else if (bytes[0] == 0) {
return EMPTYBA;
}
return bytes;
}
public boolean canEncode(char ch) {
return encodeHangul(ch).length != 0;
return bb;
}
public boolean isLegalReplacement(byte[] repl) {

@ -23,20 +23,17 @@
* have any questions.
*/
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import java.util.Arrays;
import sun.nio.cs.HistoricallyNamedCharset;
import static sun.nio.cs.CharsetMapping.*;
public class IBM942C extends Charset implements HistoricallyNamedCharset
{
public IBM942C() {
super("x-IBM942C", ExtendedCharsets.aliasesFor("x-IBM942C"));
}
@ -51,51 +48,45 @@ public class IBM942C extends Charset implements HistoricallyNamedCharset
}
public CharsetDecoder newDecoder() {
return new Decoder(this);
return new DoubleByte.Decoder(this,
IBM942.b2c,
b2cSB,
0x40,
0xfc);
}
public CharsetEncoder newEncoder() {
return new Encoder(this);
return new DoubleByte.Encoder(this, c2b, c2bIndex);
}
private static class Decoder extends IBM942.Decoder {
protected static final String singleByteToChar;
final static char[] b2cSB;
final static char[] c2b;
final static char[] c2bIndex;
static {
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
singleByteToChar = indexs +
IBM942.Decoder.singleByteToChar.substring(indexs.length());
}
static {
IBM942.initb2c();
public Decoder(Charset cs) {
super(cs, singleByteToChar);
}
}
// the mappings need udpate are
// u+001a <-> 0x1a
// u+001c <-> 0x1c
// u+005c <-> 0x5c
// u+007e <-> 0x7e
// u+007f <-> 0x7f
private static class Encoder extends IBM942.Encoder {
b2cSB = Arrays.copyOf(IBM942.b2cSB, IBM942.b2cSB.length);
b2cSB[0x1a] = 0x1a;
b2cSB[0x1c] = 0x1c;
b2cSB[0x5c] = 0x5c;
b2cSB[0x7e] = 0x7e;
b2cSB[0x7f] = 0x7f;
protected static final short index1[];
protected static final String index2a;
protected static final int shift = 5;
static {
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
index2a = IBM942.Encoder.index2a + indexs;
int o = IBM942.Encoder.index2a.length() + 15000;
index1 = new short[IBM942.Encoder.index1.length];
System.arraycopy(IBM942.Encoder.index1, 0, index1, 0, IBM942.Encoder.index1.length);
for (int i = 0; i * (1<<shift) < 128; ++i) {
index1[i] = (short)(o + i * (1<<shift));
}
}
public Encoder(Charset cs) {
super(cs, index1, index2a);
}
IBM942.initc2b();
c2b = Arrays.copyOf(IBM942.c2b, IBM942.c2b.length);
c2bIndex = Arrays.copyOf(IBM942.c2bIndex, IBM942.c2bIndex.length);
c2b[c2bIndex[0] + 0x1a] = 0x1a;
c2b[c2bIndex[0] + 0x1c] = 0x1c;
c2b[c2bIndex[0] + 0x5c] = 0x5c;
c2b[c2bIndex[0] + 0x7e] = 0x7e;
c2b[c2bIndex[0] + 0x7f] = 0x7f;
}
}

@ -23,15 +23,12 @@
* have any questions.
*/
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import java.util.Arrays;
import sun.nio.cs.HistoricallyNamedCharset;
public class IBM943C extends Charset implements HistoricallyNamedCharset
@ -51,54 +48,37 @@ public class IBM943C extends Charset implements HistoricallyNamedCharset
}
public CharsetDecoder newDecoder() {
return new Decoder(this);
return new DoubleByte.Decoder(this,
IBM943.b2c,
b2cSB,
0x40,
0xfc);
}
public CharsetEncoder newEncoder() {
return new Encoder(this);
return new DoubleByte.Encoder(this, c2b, c2bIndex);
}
private static class Decoder extends IBM943.Decoder {
protected static final String singleByteToChar;
final static char[] b2cSB;
final static char[] c2b;
final static char[] c2bIndex;
static {
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
singleByteToChar = indexs +
IBM943.Decoder.singleByteToChar.substring(indexs.length());
static {
IBM943.initb2c();
b2cSB = new char[0x100];
for (int i = 0; i < 0x80; i++) {
b2cSB[i] = (char)i;
}
for (int i = 0x80; i < 0x100; i++) {
b2cSB[i] = IBM943.b2cSB[i];
}
public Decoder(Charset cs) {
super(cs, singleByteToChar);
}
}
private static class Encoder extends IBM943.Encoder {
protected static final short index1[];
protected static final String index2a;
protected static final int shift = 6;
static {
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
index2a = IBM943.Encoder.index2a + indexs;
int o = IBM943.Encoder.index2a.length() + 15000;
index1 = new short[IBM943.Encoder.index1.length];
System.arraycopy(IBM943.Encoder.index1,
0,
index1,
0,
IBM943.Encoder.index1.length);
for (int i = 0; i * (1<<shift) < 128; ++i) {
index1[i] = (short)(o + i * (1<<shift));
}
}
public Encoder(Charset cs) {
super(cs, index1, index2a);
IBM943.initc2b();
c2b = Arrays.copyOf(IBM943.c2b, IBM943.c2b.length);
c2bIndex = Arrays.copyOf(IBM943.c2bIndex, IBM943.c2bIndex.length);
for (char c = '\0'; c < '\u0080'; ++c) {
int index = c2bIndex[c >> 8];
c2b[index + (c & 0xff)] = c;
}
}
}

@ -23,15 +23,12 @@
* have any questions.
*/
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import java.util.Arrays;
import sun.nio.cs.HistoricallyNamedCharset;
public class IBM949C extends Charset implements HistoricallyNamedCharset
@ -51,835 +48,36 @@ public class IBM949C extends Charset implements HistoricallyNamedCharset
}
public CharsetDecoder newDecoder() {
return new Decoder(this);
return new DoubleByte.Decoder(this,
IBM949.b2c,
b2cSB,
0xa1,
0xfe);
}
public CharsetEncoder newEncoder() {
return new Encoder(this);
return new DoubleByte.Encoder(this, c2b, c2bIndex);
}
public short[] getEncoderIndex1() {
return Encoder.index1;
final static char[] b2cSB;
final static char[] c2b;
final static char[] c2bIndex;
}
public String getEncoderIndex2() {
return Encoder.index2;
}
public String getEncoderIndex2a() {
return Encoder.index2a;
}
private static class Decoder extends IBM949.Decoder {
protected static final String singleByteToChar;
static {
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
singleByteToChar = indexs +
IBM949.Decoder.singleByteToChar.substring(indexs.length());
static {
IBM949.initb2c();
b2cSB = new char[0x100];
for (int i = 0; i < 0x80; i++) {
b2cSB[i] = (char)i;
}
public Decoder(Charset cs) {
super(cs, singleByteToChar);
for (int i = 0x80; i < 0x100; i++) {
b2cSB[i] = IBM949.b2cSB[i];
}
}
private static class Encoder extends IBM949.Encoder {
protected static String index2a =
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uA8A1\u0000\uD2A6" + // 15000 - 15009
"\u0000\u0000\uE7F4\uD1D6\u0000\u0000\uE6C2\uB5C7\u0000\u0000" + // 15010 - 15019
"\u0000\uB5C8\u0000\u0000\u0000\uFCD2\u0000\uEBC8\u0000\u9AFD" + // 15020 - 15029
"\u0000\uE6C1\u0000\u0000\uECD8\u0000\u0000\u0000\uEDAC\uB5C6" + // 15030 - 15039
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uC8B1\u9EE8\u0000" + // 15040 - 15049
"\u0000\u0000\u0000\u0000\u0000\u0000\uA0E0\uB5C4\u0000\u0000" + // 15050 - 15059
"\u0000\u0000\u0000\u0000\u0000\uC5F2\uB5C2\u0000\u0000\u0000" + // 15060 - 15069
"\uB5C3\u0000\u0000\u0000\uDBB5\u0000\uF3E7\uD8FE\u0000\u0000" + // 15070 - 15079
"\uE9A9\u0000\uD3C7\u0000\u0000\uDCDD\uF8AE\uB5BB\u0000\u0000" + // 15080 - 15089
"\u9EE7\uB5BC\uB5BD\u0000\uB5BE\uB5B7\u0000\u0000\uB5B8\uB5B9" + // 15090 - 15099
"\u0000\uB5BA\u0000\uECA9\u0000\uF2EB\u0000\uFDEF\u0000\uF9F3" + // 15100 - 15109
"\u0000\uA2A3\u0000\uA1D3\uA2A4\u0000\u0000\u0000\uA1D4\uB5B3" + // 15110 - 15119
"\u0000\u0000\u0000\uB5B4\u0000\u0000\u0000\uD2FC\u0000\u0000" + // 15120 - 15129
"\u0000\u0000\u0000\uB4BA\uB4BB\u0000\u0000\uD7EB\u0000\u0000" + // 15130 - 15139
"\u0000\u0000\u0000\u0000\uF7F7\uDCAC\u0000\u0000\uF5E9\u0000" + // 15140 - 15149
"\u9DFA\u9EA9\u0000\u0000\u0000\uA8AB\uA9AB\u0000\u0000\u0000" + // 15150 - 15159
"\u0000\uBFB0\uBFB1\uBFB2\uBFB3\uB5B1\uB5B2\u0000\u0000\u0000" + // 15160 - 15169
"\u0000\u0000\u0000\uD1A5\uDCB8\u0000\u0000\uCFD9\u0000\u0000" + // 15170 - 15179
"\uDCCD\uEDFB\u0000\uDEF0\uB5AF\u0000\u0000\u0000\uB5B0\u0000" + // 15180 - 15189
"\u0000\u0000\uCDA2\uE8AE\u0000\u0000\u0000\uE1BD\uB5A9\uB5AA" + // 15190 - 15199
"\u0000\uB5AB\uB5AC\uB5AD\u0000\u0000\uEEAE\uD6AE\u0000\u0000" + // 15200 - 15209
"\u9DA1\u0000\u0000\uDFD5\u0000\u0000\uEDD7\u0000\u0000\u0000" + // 15210 - 15219
"\u9AAC\u9AB0\u9AB8\u9AC9\u9AD3\uB5A8\u0000\u0000\u0000\u0000" + // 15220 - 15229
"\u0000\u0000\u0000\uA0D9\uB5A5\uB5A6\u0000\u0000\uB5A7\u0000" + // 15230 - 15239
"\u0000\u0000\uECEE\u0000\u0000\uDDAA\u0000\u0000\uEABE\uD9B1" + // 15240 - 15249
"\u0000\u0000\u0000\u0000\u0000\uB8A3\uB8A4\u0000\u0000\uD4F5" + // 15250 - 15259
"\u0000\uD0C9\uEFA7\uE2EC\u0000\uDBEA\u9EE4\uB5A2\u9EE5\uB5A3" + // 15260 - 15269
"\u0000\u0000\uB5A4\u0000\uEEBB\uCDB4\u9BF2\uE0F3\uEACD\u0000" + // 15270 - 15279
"\u0000\u0000\uDCEE\u0000\u0000\uF5EA\uE6E0\uB4F8\u0000\u0000" + // 15280 - 15289
"\uB4F9\uB4FA\u0000\uB4FB\uB4FC\u9EE3\u0000\u0000\u0000\u0000" + // 15290 - 15299
"\u0000\u0000\u0000\uA0BE\uB4EF\uB4F0\u0000\uB4F1\uB4F2\uB4F3" + // 15300 - 15309
"\u0000\u0000\uFBAC\uCFC3\uEBFD\u0000\u0000\u0000\u0000\uCCF6" + // 15310 - 15319
"\u0000\u0000\uD3BA\u0000\uDBAA\u0000\u0000\u0000\uF7E0\u0000" + // 15320 - 15329
"\u0000\u0000\uDADA\u0000\uF2DC\uFBD6\uE9B2\uB4EE\u0000\u0000" + // 15330 - 15339
"\u0000\u0000\u0000\u0000\u0000\u9FC7\uB4EB\uB4EC\u0000\u0000" + // 15340 - 15349
"\uB4ED\u0000\u0000\u0000\uEAB8\uD1F9\u0000\u0000\u0000\u0000" + // 15350 - 15359
"\uC6A1\u0000\u0000\u0000\uF9DB\u0000\u0000\u0000\u0000\uF4E6" + // 15360 - 15369
"\u0000\u0000\uE6C5\uEFD5\uB4E6\uB4E7\uB4E8\uB4E9\u0000\u0000" + // 15370 - 15379
"\u0000\uB4EA\uB4DC\u0000\u0000\uB4DD\uB4DE\uB4DF\uB4E0\uB4E1" + // 15380 - 15389
"\u9EE1\u0000\uB4D8\u0000\uB4D9\uB4DA\uB4DB\u0000\uCACC\u0000" + // 15390 - 15399
"\u0000\u0000\u0000\uFBBF\u0000\u0000\uE3BD\u0000\uCFE1\uF0C0" + // 15400 - 15409
"\uECDA\u0000\uDDD7\uB4D4\uB4D5\u0000\uB4D6\u0000\uB4D7\u0000" + // 15410 - 15419
"\u0000\uE4B7\u0000\uEADB\u0000\uF5FA\u9CE8\u0000\uEEF5\u0000" + // 15420 - 15429
"\uDECE\u0000\u0000\u0000\u0000\uE7F3\uB4D2\u9EE0\uB4D3\u0000" + // 15430 - 15439
"\u0000\u0000\u0000\u0000\uBDB0\uBDB1\u0000\uBDB2\uB4CF\uB4D0" + // 15440 - 15449
"\u0000\u0000\uB4D1\u0000\u0000\u0000\uF1BE\u0000\u0000\uD3AC" + // 15450 - 15459
"\u0000\u0000\uCDCC\u0000\u0000\u0000\u0000\uEDD9\u0000\uFCB1" + // 15460 - 15469
"\uCCF8\u0000\u0000\uDDC6\uFAD1\u0000\uF7DF\uB4CD\u0000\u0000" + // 15470 - 15479
"\u0000\uB4CE\u0000\u0000\u0000\uE0C2\u0000\uCAE4\u0000\uE7B7" + // 15480 - 15489
"\u0000\uD2AF\uDCE5\u0000\u0000\u0000\u0000\uD0A5\uF1B4\uB4C6" + // 15490 - 15499
"\uB4C7\u0000\uB4C8\u0000\uB4C9\uB4CA\u9EDE\uB4C3\uB4C4\uB4C5" + // 15500 - 15509
"\u0000\u0000\u0000\u0000\u0000\uBDAC\uBDAD\u0000\u0000\u9AF5" + // 15510 - 15519
"\uF1E3\uD5EE\u0000\u0000\u0000\u0000\uE3E2\uFBBC\uD9A4\u0000" + // 15520 - 15529
"\u0000\uDFE9\u0000\uEEDE\u0000\u0000\uF7C2\u0000\uD7A4\uCEC5" + // 15530 - 15539
"\u0000\u0000\u0000\u0000\uCED5\uD6E6\uB4C0\uB4C1\u0000\u0000" + // 15540 - 15549
"\uB4C2\u0000\u0000\u0000\uF1BD\u0000\u0000\uE2E7\uFDD7\u0000" + // 15550 - 15559
"\uD9F8\uD4C2\u0000\u0000\u0000\u0000\uF6E5\u0000\uA2D9\uA2D7" + // 15560 - 15569
"\u0000\u0000\u0000\u0000\u0000\u0000\uCBCA\u0000\u0000\uD6B7" + // 15570 - 15579
"\uCDB3\u0000\u0000\u0000\u0000\u9CE9\uB4B8\uB4B9\u0000\u0000" + // 15580 - 15589
"\u0000\u0000\u0000\u0000\uE7A5\u0000\uD5F5\uD3BE\uB4B7\u0000" + // 15590 - 15599
"\u0000\u0000\u0000\u0000\u0000\u0000\u9EFE\uB4B5\u0000\u0000" + // 15600 - 15609
"\u0000\uB4B6\u0000\u0000\u0000\uCCBD\u0000\u0000\uD1A9\uDDCC" + // 15610 - 15619
"\u0000\uD3D2\u0000\uF5C0\u0000\u0000\u0000\uDFDD\u0000\uA1E7" + // 15620 - 15629
"\uA1E8\uA1E6\uA1E9\uA1EA\uA2D5\uA2D8\uA2D6\uB4B2\u0000\u0000" + // 15630 - 15639
"\u0000\u0000\u0000\u0000\u0000\uB7AD\uB4AB\u0000\u0000\uB4AC" + // 15640 - 15649
"\uB4AD\u0000\u0000\u0000\uE7FD\u0000\u0000\uE6A3\uFBF1\uCBB0" + // 15650 - 15659
"\uB4A5\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u9EEC\uB4A2" + // 15660 - 15669
"\uB4A3\u0000\u0000\uB4A4\u0000\u0000\u0000\uD4B8\uEBBE\uDDEF" + // 15670 - 15679
"\u0000\uDDF0\uDDF1\uB3FB\u0000\u0000\u0000\uB3FC\u0000\u0000" + // 15680 - 15689
"\u0000\uDFAF\u0000\uCAC3\u0000\u0000\uEEFC\u9EDC\u0000\u0000" + // 15690 - 15699
"\u0000\u0000\u0000\u0000\u0000\u9EE9\uB3F9\u0000\u0000\u0000" + // 15700 - 15709
"\u0000\u0000\u0000\u0000\u9EDB\uB3F7\u0000\u0000\u0000\uB3F8" + // 15710 - 15719
"\u0000\u0000\u0000\uE0E8\u0000\u0000\uD3AB\u0000\uEBDC\uB3F0" + // 15720 - 15729
"\uB3F1\u0000\uB3F2\u0000\uB3F3\u0000\u0000\u9DEB\u0000\u0000" + // 15730 - 15739
"\u0000\u0000\u0000\uEADA\uB3EE\u0000\uB3EF\u0000\u0000\u0000" + // 15740 - 15749
"\u0000\u0000\uBCF2\uBCF3\u0000\uBCF4\uB3EB\uB3EC\u9EDA\u0000" + // 15750 - 15759
"\uB3ED\u0000\u0000\u0000\uE8E0\u0000\u0000\u0000\u0000\u0000" + // 15760 - 15769
"\uB3FA\u0000\u0000\u0000\uE7A2\uE4D9\u0000\u0000\u0000\uF0E6" + // 15770 - 15779
"\u0000\u0000\u0000\uE4B9\uB3EA\u0000\u0000\u0000\u0000\u0000" + // 15780 - 15789
"\u0000\u0000\u9ED9\uB3E8\u9ED8\u0000\u0000\uB3E9\u0000\u0000" + // 15790 - 15799
"\u0000\uE9B0\u0000\u0000\u0000\u0000\u0000\uB3DB\uB3DC\u0000" + // 15800 - 15809
"\uB3DD\uB3E4\uB3E5\u0000\u9ED7\uB3E6\uB3E7\u0000\u0000\u9CE3" + // 15810 - 15819
"\u0000\u0000\u0000\u0000\uE4B6\u0000\uE5E8\uDCC3\u0000\u0000" + // 15820 - 15829
"\uEDDE\uD3F2\u0000\u0000\uDCA7\u0000\u0000\uD6E7\u0000\u0000" + // 15830 - 15839
"\u0000\uFBD9\uEDF7\u0000\u0000\uE5B5\uB3E3\u0000\u0000\u0000" + // 15840 - 15849
"\u0000\u0000\u0000\u0000\u9ECD\uB3E0\uB3E1\u0000\u0000\uB3E2" + // 15850 - 15859
"\u0000\u0000\u9ED6\uB3DE\uB3DF\u0000\u0000\u0000\u0000\u0000" + // 15860 - 15869
"\u0000\uDEB0\u0000\u0000\u0000\uD5B2\u0000\u0000\u0000\uD5BC" + // 15870 - 15879
"\u0000\uCBA8\uEBBC\uE4BE\u0000\u0000\u0000\u0000\u0000\uCFCF" + // 15880 - 15889
"\u0000\u0000\u0000\uEDB9\uF1C5\u0000\uF3CF\uD7AB\uB3D9\u0000" + // 15890 - 15899
"\u0000\u0000\uB3DA\u0000\u0000\u0000\uCFED\u0000\uEDEB\u0000" + // 15900 - 15909
"\u0000\u0000\uF0EC\u0000\u0000\u0000\u0000\uDCB3\u0000\u0000" + // 15910 - 15919
"\u0000\u0000\uC2EA\u0000\u0000\u0000\uEFB2\u0000\u0000\u0000" + // 15920 - 15929
"\u0000\uF1DA\u0000\uFAF2\u0000\u0000\uE8C3\u0000\uF1C8\u0000" + // 15930 - 15939
"\u0000\u0000\uCEF1\uB3D1\uB3D2\u0000\uB3D3\uB3D4\uB3D5\u9ED5" + // 15940 - 15949
"\u0000\uCFDC\u0000\uD3D1\u0000\u0000\uCCB1\uF7D8\u0000\uA5A9" + // 15950 - 15959
"\uA5AA\u0000\u0000\u0000\u0000\u0000\u0000\uDFA8\u0000\u0000" + // 15960 - 15969
"\uF5B6\u0000\u0000\u0000\u0000\u0000\u0000\uF4E9\uD6EC\uEBD3" + // 15970 - 15979
"\uB3CE\u0000\uB3CF\uB3D0\u0000\u0000\u0000\u0000\uD8D0\u0000" + // 15980 - 15989
"\uF0C8\uD1A1\uD1A2\uB3CA\uB3CB\u0000\uB3CC\uB3CD\u0000\u0000" + // 15990 - 15999
"\u9ED4\uB3C8\u0000\u0000\u0000\u0000\uB3C9\u0000\u0000\u9AFC" + // 16000 - 16009
"\u0000\uD3B1\u0000\u0000\u0000\u0000\uDAE4\u0000\u0000\u0000" + // 16010 - 16019
"\u9CB1\uB3C7\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u9EBD" + // 16020 - 16029
"\uB3C4\uB3C5\u0000\u0000\uB3C6\u0000\u0000\u0000\u9BC7\u0000" + // 16030 - 16039
"\uD5B1\u0000\u0000\u0000\uFBAF\u0000\u0000\u0000\uCBD1\uB3C2" + // 16040 - 16049
"\uB3C3\u0000\u0000\u0000\u0000\u0000\u0000\uCCD7\uE5C2\u0000" + // 16050 - 16059
"\u0000\uF6C9\u9AE9\u0000\u0000\u0000\u0000\u0000\u9EFD\uB7E4" + // 16060 - 16069
"\u0000\uB7E5\uB3BD\u0000\u0000\u9ED2\uB3BE\u0000\u0000\u0000" + // 16070 - 16079
"\uD5EA\uF1EE\u0000\u0000\u0000\u9AF7\uB3B2\uB3B3\u0000\uB3B4" + // 16080 - 16089
"\uB3B5\uB3B6\uB3B7\uB3B8\uB3AF\uB3B0\uB3B1\u0000\u0000\u0000" + // 16090 - 16099
"\u0000\u0000\uBCEE\uBCEF\u0000\u0000\u9CB8\u0000\u0000\u0000" + // 16100 - 16109
"\u0000\u0000\u0000\uDAE1\u0000\uD6B6\u0000\uF3F1\u0000\u0000" + // 16110 - 16119
"\u0000\uE3D0\u0000\u0000\uF2FB\uB3AA\uB3AB\uB3AC\u0000\uB3AD" + // 16120 - 16129
"\u0000\u0000\uB3AE\u9ED1\uB3A9\u0000\u0000\u0000\u0000\u0000" + // 16130 - 16139
"\u0000\uEBF4\u0000\u0000\u9BED\uB3A4\u0000\u0000\u0000\uB3A5" + // 16140 - 16149
"\u0000\u0000\u0000\uD4A2\uCFF6\u0000\u0000\u0000\u0000\uC5B4" + // 16150 - 16159
"\uC5B5\u0000\uC5B6\u9ED0\u0000\u0000\u0000\u0000\u0000\u0000" + // 16160 - 16169
"\u0000\uB1CC\uB2F6\u0000\uB2F7\u0000\uB2F8\u0000\uB2F9\u0000" + // 16170 - 16179
"\uDCFC\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uE1B0\uB2F3" + // 16180 - 16189
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uE4CB\uB2EF\u0000" + // 16190 - 16199
"\u0000\u0000\uB2F0\u0000\u0000\u0000\uDBE0\u0000\u0000\u0000" + // 16200 - 16209
"\u0000\u0000\u9ED3\u0000\u0000\u0000\uE6E7\u0000\u0000\uEAC7" + // 16210 - 16219
"\u0000\uF1D8\u0000\u0000\uD8D8\u0000\u0000\uE0F2\u0000\uA5A1" + // 16220 - 16229
"\uA5A2\uA5A3\uA5A4\uA5A5\uA5A6\uA5A7\uA5A8\uB2EB\uB2EC\u0000" + // 16230 - 16239
"\u0000\uB2ED\u0000\u0000\u0000\uE4C5\u0000\u0000\u9DB9\u0000" + // 16240 - 16249
"\u0000\uCDCB\u0000\u0000\u0000\u0000\u0000\u0000\uEDA8\uDEC2" + // 16250 - 16259
"\uF6E2\uEDDC\uB2EA\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + // 16260 - 16269
"\uEED2\uB2E7\uB2E8\u0000\u0000\uB2E9\u0000\u0000\u0000\u9BF7" + // 16270 - 16279
"\uCFB0\uF7D9\uF3E6\u9BF5\u0000\uEBD9\u0000\uCFA7\uEAAF\u0000" + // 16280 - 16289
"\u0000\u0000\u0000\uC2BC\uC2BD\u0000\u0000\uF2ED\u0000\uDBD9" + // 16290 - 16299
"\u0000\uF0A8\u0000\u0000\uDBDF\uD3D3\uF8C7\u0000\u0000\u0000" + // 16300 - 16309
"\u0000\uC2EE\uC2EF\u0000\u0000\u9AEE\uCACE\uF8C1\uD2B4\u0000" + // 16310 - 16319
"\u0000\uDCB4\uB2E5\uB2E6\u0000\u0000\u0000\u0000\u0000\u0000" + // 16320 - 16329
"\uDAE6\uF7B3\u0000\u0000\uCBB9\u0000\u0000\uEDF9\u0000\u0000" + // 16330 - 16339
"\u0000\uD1D3\u0000\uE5F0\u0000\u0000\u0000\uD8ED\uE3C4\uF0F1" + // 16340 - 16349
"\u0000\u0000\uD4CD\u0000\u9DAB\uF3B8\u0000\u0000\u0000\uA0CF" + // 16350 - 16359
"\uC3E8\u0000\u0000\u0000\uC8B6\u0000\uC8B7\u0000\u0000\uDAC8" + // 16360 - 16369
"\uDFA6\u0000\uF9B3\uF2D2\u0000\uCAC4\u9ECC\u0000\u0000\u0000" + // 16370 - 16379
"\uB2E4\u0000\u0000\u0000\uE5C5\u0000\u0000\u0000\u0000\u0000" + // 16380 - 16389
"\uB3A6\uB3A7\u0000\uB3A8\uB2DE\uB2DF\u0000\uB2E0\u0000\uB2E1" + // 16390 - 16399
"\uB2E2\u0000\uD3DC\u0000\u0000\uFAFE\u9AE7\u0000\u0000\u0000" + // 16400 - 16409
"\uDDFB\u0000\u0000\u0000\u0000\uA7A4\u0000\u0000\uA2E0\u0000" + // 16410 - 16419
"\uA5B8\uA5B9\u0000\u0000\u0000\u0000\u0000\u0000\uF9C2\u0000" + // 16420 - 16429
"\uEABC\uB2DC\u0000\u0000\u0000\u0000\u0000\u0000\uB2DD\uB2D9" + // 16430 - 16439
"\uB2DA\u0000\u0000\uB2DB\u0000\u0000\u9ECB\uB2D5\uB2D6\u0000" + // 16440 - 16449
"\u9EC9\u0000\uB2D7\u0000\u0000\u9BE1\u0000\uE2F2\u9CEB\u0000" + // 16450 - 16459
"\u0000\u0000\uEEB9\u0000\u0000\u0000\u0000\uD5E3\uB2D4\u0000" + // 16460 - 16469
"\u0000\u0000\u0000\u0000\u0000\u0000\uE8A8\uB2D2\u0000\u0000" + // 16470 - 16479
"\u0000\uB2D3\u0000\u0000\u0000\u9BF4\u0000\u0000\u0000\u0000" + // 16480 - 16489
"\u0000\uB3A2\uB3A3\u0000\u0000\uF5AF\u0000\u9CDC\u0000\u0000" + // 16490 - 16499
"\uCEF0\u0000\uCCD0\u0000\u0000\u0000\u0000\uCFA6\u0000\u0000" + // 16500 - 16509
"\uF7B6\u0000\u0000\u0000\u0000\uF4DE\u0000\uA5B0\uA5B1\uA5B2" + // 16510 - 16519
"\uA5B3\uA5B4\uA5B5\uA5B6\uA5B7\u9EC8\u0000\u0000\u0000\u0000" + // 16520 - 16529
"\u0000\u0000\u0000\uCFCE\u9EC6\u0000\u0000\u9EC7\uB2CD\uB2CE" + // 16530 - 16539
"\u0000\u0000\uF3F9\u0000\uEDF8\u0000\uF5C7\u0000\u0000\uF6C4" + // 16540 - 16549
"\u0000\u0000\u0000\uEEDD\uE7C4\u0000\uF1A6\uCBD5\u0000\u0000" + // 16550 - 16559
"\u0000\u0000\u0000\u0000\uE1A3\uD2E0\u0000\uA2B6\u0000\uA1C7" + // 16560 - 16569
"\uA1C8\u0000\u0000\u0000\u0000\uBFC0\uBFC1\u0000\u0000\uCAA9" + // 16570 - 16579
"\u0000\u0000\u0000\u0000\u0000\u0000\uF7B0\u0000\uCCEA\uB2CC" + // 16580 - 16589
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u9BD5\uB2CA\uB2CB" + // 16590 - 16599
"\u0000\u0000\u9EC5\u0000\u0000\u0000\uDFF8\u0000\u0000\u0000" + // 16600 - 16609
"\u0000\u0000\uB2EE\u9ECE\u0000\u0000\uD9A1\u0000\uD8C0\uDCDB" + // 16610 - 16619
"\u0000\u0000\uEDBD\uB2C1\u0000\uB2C2\u9EC4\uB2C3\u0000\u0000" + // 16620 - 16629
"\u0000\uDCEA\u0000\u0000\uF0F7\u0000\uF0CA\uB2BE\u0000\u0000" + // 16630 - 16639
"\u0000\u0000\u0000\u0000\u0000\uD7F7\uB2BC\u0000\u0000\u0000" + // 16640 - 16649
"\u0000\uB2BD\u0000\u0000\uDEEE\u0000\u0000\u0000\u0000\u9DF2" + // 16650 - 16659
"\u0000\uF2A3\u0000\uF7F8\u0000\u0000\u0000\u0000\uD0B3\uB2B9" + // 16660 - 16669
"\u0000\u0000\u0000\uB2BA\u0000\u0000\u0000\uF1BB\u0000\u0000" + // 16670 - 16679
"\u0000\u9CF2\uE9F1\uB2B5\u0000\u0000\uB2B6\u0000\uB2B7\u0000" + // 16680 - 16689
"\u0000\uE9C8\u0000\uCBCF\u0000\uE3C9\u0000\u0000\uF6E0\u0000" + // 16690 - 16699
"\u0000\u0000\u0000\uE9F3\uF2C3\uB2B2\uB2B3\u0000\u0000\uB2B4" + // 16700 - 16709
"\u0000\u0000\u0000\uE2E3\uEEFB\u0000\u0000\uDFF7\uD7CA\uB2B0" + // 16710 - 16719
"\uB2B1\u0000\u0000\u0000\u0000\u0000\u0000\uE1B8\u0000\uE8F4" + // 16720 - 16729
"\uD3FD\uB2AB\u0000\u0000\u0000\uB2AC\u0000\u0000\u0000\u9DA3" + // 16730 - 16739
"\u0000\u0000\u0000\u0000\u0000\uB2D8\u0000\u0000\u0000\uF1CD" + // 16740 - 16749
"\u0000\u0000\u0000\u0000\uD2B3\uD2BF\u0000\u0000\u0000\uE3F4" + // 16750 - 16759
"\uCDD0\u0000\u0000\u9BCE\u9EC2\u0000\u0000\u0000\u0000\u0000" + // 16760 - 16769
"\u0000\u0000\uCBBE\uB1FE\uB2A1\u0000\uB2A2\uB2A3\uB2A4\u0000" + // 16770 - 16779
"\u0000\uDBBC\u0000\u0000\u0000\u0000\u0000\u0000\uA2D0\u0000" + // 16780 - 16789
"\uA2D1\u0000\uF2A2\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + // 16790 - 16799
"\uFDBD\uB1FD\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uE4D5" + // 16800 - 16809
"\uB1FA\uB1FB\u0000\u0000\uB1FC\u0000\u0000\u0000\uEAF6\u0000" + // 16810 - 16819
"\u0000\uF6F9\u9CFA\u0000\uEEA4\u0000\u0000\u0000\u0000\uD0A4" + // 16820 - 16829
"\u0000\u0000\u9ACF\u0000\u0000\u0000\uE1DE\uCBEE\u0000\uA2D3" + // 16830 - 16839
"\uA2D4\u0000\u0000\u0000\uA1A5\uA1A6\u0000\uA3A1\uA3A2\uA3A3" + // 16840 - 16849
"\uA3A4\uA3A5\uA3A6\uA3A7\uB1F7\uB1F8\u9EC1\u0000\u0000\uB1F9" + // 16850 - 16859
"\u0000\u0000\uD9D5\u0000\u0000\uDFAA\u0000\u0000\u0000\uEAE3" + // 16860 - 16869
"\u0000\u0000\u0000\u0000\u0000\u9CD8\u0000\u0000\u0000\uDCB9" + // 16870 - 16879
"\u0000\u0000\u0000\uF1C0\uB1F1\u0000\u0000\u0000\uB1F2\u0000" + // 16880 - 16889
"\uB1F3\u0000\uD3A5\u0000\u0000\u0000\u9EA2\u0000\u0000\uF7CF" + // 16890 - 16899
"\uB1E8\uB1E9\u0000\uB1EA\u9EBF\uB1EB\uB1EC\u0000\uCFEA\u0000" + // 16900 - 16909
"\u0000\uCFD0\u0000\uEACC\u0000\u0000\uD0F9\uECAB\uDED3\uF7E9" + // 16910 - 16919
"\u9DE3\u0000\uF9F5\uB1E6\u0000\uB1E7\u0000\u9EBE\u0000\u0000" + // 16920 - 16929
"\u0000\uD8DD\u0000\uCDFD\uF2AB\u0000\u0000\u9DD6\u0000\u0000" + // 16930 - 16939
"\u0000\uD0AD\u0000\u0000\uF2C2\uF6C3\u0000\uD7D2\u0000\u0000" + // 16940 - 16949
"\uF9A2\uB1E2\uB1E3\u0000\u0000\uB1E4\u0000\u0000\uB1E5\uB1DD" + // 16950 - 16959
"\uB1DE\u0000\uB1DF\u0000\uB1E0\u0000\u9EBB\uB1DB\uB1DC\u9EBA" + // 16960 - 16969
"\u0000\u0000\u0000\u0000\u0000\uBCE2\u0000\u0000\u0000\uEDE7" + // 16970 - 16979
"\uFBB5\uF8EC\u0000\u0000\u0000\uCEF2\u0000\uD6D9\u0000\u0000" + // 16980 - 16989
"\u9BD9\u0000\u0000\u0000\u0000\u0000\uEECA\uB1D7\uB1D8\u0000" + // 16990 - 16999
"\u0000\uB1D9\u0000\u0000\uB1DA\uB1D5\u0000\u0000\u0000\uB1D6" + // 17000 - 17009
"\u0000\u0000\u0000\u9DAE\u0000\uE7FB\uFCB7\uFCE4\uFBC5\uB1D1" + // 17010 - 17019
"\uB1D2\u0000\uB1D3\u0000\u9EB8\u0000\u0000\uE7A8\u0000\u0000" + // 17020 - 17029
"\u0000\u0000\u0000\u0000\uA1E5\uA1E4\u0000\u0000\uF2F1\u0000" + // 17030 - 17039
"\u0000\u0000\u0000\u0000\u0000\uB8D2\u0000\u0000\uE0FA\uEEC4" + // 17040 - 17049
"\uD9DE\u0000\u0000\u0000\u0000\uC6DB\uC6DC\u0000\u0000\uFCC1" + // 17050 - 17059
"\u0000\uEEAB\uD4A5\u9AEA\u0000\u0000\uFDC3\u0000\u0000\u0000" + // 17060 - 17069
"\uEBF6\uCFB2\u0000\uCDDD\u0000\u0000\u0000\u0000\u0000\u0000" + // 17070 - 17079
"\u0000\uD9FD\uB1D0\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + // 17080 - 17089
"\uD6DB\uB1CD\uB1CE\u0000\u0000\uB1CF\u0000\u0000\u0000\uDCB6" + // 17090 - 17099
"\uE4E9\u0000\u0000\u0000\u0000\uC4BF\uC4C0\u0000\u0000\uFDC0" + // 17100 - 17109
"\u0000\u0000\u0000\u0000\u0000\u0000\uA6A3\uA6C8\uA6C7\uA6AE" + // 17110 - 17119
"\uB1C8\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u9BAA\uB1C5" + // 17120 - 17129
"\uB1C6\u0000\u0000\uB1C7\u0000\u0000\u0000\uE8DA\uDAC3\uDAC4" + // 17130 - 17139
"\uD4C5\u0000\uE7FA\uB1BA\u0000\u0000\uB1BB\uB1BC\uB1BD\uB1BE" + // 17140 - 17149
"\u0000\uECD7\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uEAE6" + // 17150 - 17159
"\uB1B5\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uF1E7\uB1B3" + // 17160 - 17169
"\u0000\u0000\u0000\uB1B4\u0000\u0000\u0000\uD7B2\u0000\u0000" + // 17170 - 17179
"\u0000\u0000\uD0FD\uB1AD\u0000\u0000\u0000\uB1AE\u0000\u0000" + // 17180 - 17189
"\u0000\uD6B0\uF8CA\u0000\uFCFA\u0000\uD9FE\u9EB5\uB1A8\u0000" + // 17190 - 17199
"\u9EB6\uB1A9\uB1AA\u0000\u0000\uF5D7\u0000\u0000\uD8BF\u0000" + // 17200 - 17209
"\u0000\u0000\u9BA9\u0000\u0000\uD0C1\u0000\u0000\uDCBC\uD2B6" + // 17210 - 17219
"\uF5D5\u0000\u0000\u0000\u0000\uC8C4\uC8C5\u0000\u0000\uCEEA" + // 17220 - 17229
"\u0000\u0000\u0000\u0000\u0000\u0000\u9BBA\u9AF2\uEAE0\uB1A7" + // 17230 - 17239
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uD9F6\uB1A5\u9EB4" + // 17240 - 17249
"\u0000\u0000\uB1A6\u0000\u0000\u0000\uCDBB\u0000\uEFDA\uEED8" + // 17250 - 17259
"\u0000\uDDA7\uB0FC\u0000\u0000\u0000\uB0FD\u0000\uB0FE\u0000" + // 17260 - 17269
"\u9DA7\u0000\u9EA7\u0000\u0000\u0000\u0000\u0000\uCFD5\uD8FD" + // 17270 - 17279
"\u0000\u0000\uE2DE\uE1B5\u0000\u0000\uCDEF\uF1A7\uCEE5\uB0F5" + // 17280 - 17289
"\uB0F6\u0000\uB0F7\u0000\uB0F8\uB0F9\u0000\uD0EF\u0000\u9DB2" + // 17290 - 17299
"\uFDED\u9BFE\u0000\u0000\u0000\uD5BE\u0000\u0000\u0000\u0000" + // 17300 - 17309
"\uA1D8\u0000\u0000\u0083\u0000\uA1AE\uA1AF\u0000\u0000\uA1B0" + // 17310 - 17319
"\uA1B1\u0000\u0000\uF7A2\u0000\u0000\u0000\u0000\u0000\u0000" + // 17320 - 17329
"\uD4FE\u0000\u0000\uCDB2\u0000\uDAAB\u0000\uCAA7\u0000\u0000" + // 17330 - 17339
"\uEAAC\u0000\u0000\u0000\uCAA8\u0000\u0000\uF3DD\u0000\u0000" + // 17340 - 17349
"\u0000\uE4DA\u0000\u0000\uFDAA\uF9E2\u0000\u0000\u0000\u0000" + // 17350 - 17359
"\u0000\u9DDD\uD8EA\u0000\u0000\uEAE7\uDFC3\uD1D2\uCEE2\u0000" + // 17360 - 17369
"\uD3A4\u0000\uC8F0\u0000\u0000\uC8F1\uA0FE\u0000\u0000\uC7F3" + // 17370 - 17379
"\u0000\u0000\u0000\u0000\u0000\u0000\uF6DD\u0000\uF1A3\u0000" + // 17380 - 17389
"\uC8F6\u0000\u0000\u0000\u0000\u0000\u0000\uCEBC\u0000\u0000" + // 17390 - 17399
"\u0000\uD8F5\u0000\u0000\u0000\uCCCE\u0000\u0000\uC8AC\u0000" + // 17400 - 17409
"\u0000\uC8AD\uC8AE\u0000\u0000\uC5B7\u0000\u0000\u0000\u0000" + // 17410 - 17419
"\u0000\u0000\u9BA7\uF1CA\u0000\uCEA3\uB0F1\u9EB2\uB0F2\u0000" + // 17420 - 17429
"\uB0F3\u0000\u0000\uB0F4\uB0ED\uB0EE\u0000\u0000\uB0EF\u0000" + // 17430 - 17439
"\u0000\uB0F0\uB0E9\u0000\u0000\u0000\uB0EA\u0000\u0000\u0000" + // 17440 - 17449
"\uCAF2\uDFA4\u0000\u0000\uD4C4\u0000\uF4B7\uFDC2\uFCB0\u0000" + // 17450 - 17459
"\uFDEC\uCAE2\u0000\u0000\uD7C4\u0000\u0000\u0000\u0000\u0000" + // 17460 - 17469
"\u0000\uE7E2\u0000\u0000\uDDDA\u0000\u0000\u0000\u0000\u0000" + // 17470 - 17479
"\u0000\uE3CE\u0000\u0000\uE3A1\u0000\u0000\uE8E3\u0000\u0000" + // 17480 - 17489
"\uF3AB\uB0E2\uB0E3\u0000\uB0E4\uB0E5\uB0E6\u0000\u0000\uEEC9" + // 17490 - 17499
"\u0000\u0000\u0000\uE2DD\u0000\u0000\uE9E0\u0000\u9BB0\u0000" + // 17500 - 17509
"\uD0D8\uFCA2\uD4BE\uB0E1\u0000\u0000\u0000\u0000\u0000\u0000" + // 17510 - 17519
"\u0000\uE4E1\uB0DC\uB0DD\uB0DE\u0000\uB0DF\u0000\u0000\uB0E0" + // 17520 - 17529
"\uB0DA\uB0DB\u0000\u0000\u0000\u0000\u0000\u0000\uDDC9\u0000" + // 17530 - 17539
"\u0000\uD4D3\uB0D5\u0000\u0000\u9EB1\uB0D6\u0000\u0000\u0000" + // 17540 - 17549
"\uF7EC\u0000\u0000\u0000\uE8F6\u0000\uCBD3\u0000\u0000\u9AD7" + // 17550 - 17559
"\uE0BC\u0000\uF4CA\uD4FA\uB0CB\uB0CC\u0000\uB0CD\uB0CE\uB0CF" + // 17560 - 17569
"\uB0D0\u9EB0\uB0C9\u9EAF\uB0CA\u0000\u0000\u0000\u0000\u0000" + // 17570 - 17579
"\uBCD2\uBCD3\uBCD4\u0000\uD3D0\u0000\u0000\u0000\u0000\u0000" + // 17580 - 17589
"\u0000\u0000\uDFC1\uB0C5\uB0C6\u0000\u0000\uB0C7\u0000\u0000" + // 17590 - 17599
"\uB0C8\uB0C3\u0000\u0000\u0000\uB0C4\u0000\u0000\u0000\uCCAA" + // 17600 - 17609
"\u0000\u0000\uF0C3\uCCD6\u0000\uF4FA\u0000\u0000\u0000\u0000" + // 17610 - 17619
"\uCDD6\uFCF6\u0000\uA1A9\u0000\u0000\u0000\uA1AA\u0000\u0000" + // 17620 - 17629
"\u0000\uDBF2\u0000\u0000\u0000\u0000\uC5F5\uC5F6\u0000\u0000" + // 17630 - 17639
"\uDDC3\u0000\uF9DF\u0000\u0000\u0000\u0000\uC1DC\uC1DD\u0000" + // 17640 - 17649
"\uC1DE\uB0BF\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uEDFE" + // 17650 - 17659
"\uB0BC\uB0BD\u0000\u0000\uB0BE\u0000\u0000\u0000\uD2B5\u0000" + // 17660 - 17669
"\u0000\u0000\uD3D5\u0000\uF9EB\uEEA3\u0000\u0000\u0000\u0000" + // 17670 - 17679
"\u0000\u0000\uD1BE\u0000\u0000\uF6B9\u0000\u0000\u0000\u0000" + // 17680 - 17689
"\u0000\u0000\uE9B3\u0000\u0000\uCDDF\u0000\u0000\uF5CB\u0000" + // 17690 - 17699
"\uE4F0\uCBAB\uB0BA\uB0BB\u0000\u0000\u0000\u0000\u0000\u0000" + // 17700 - 17709
"\uE3E5\u0000\uCBC5\uEAB4\uB0B5\u0000\u0000\u0000\uB0B6\u0000" + // 17710 - 17719
"\u0000\u0000\uFDCD\u0000\u0000\u0000\uF3B6\u0000\uE4EE\uF9A1" + // 17720 - 17729
"\u0000\u0000\uFBEF\u0000\u0000\u0000\uEFA8\u0000\u0000\u0000" + // 17730 - 17739
"\uEEB4\uB0A8\uB0A9\uB0AA\uB0AB\uB0AC\uB0AD\uB0AE\uB0AF\uB0A5" + // 17740 - 17749
"\uB0A6\uB0A7\u9EAE\u0000\u0000\u0000\u0000\uE0C1\uEFDB\u0000" + // 17750 - 17759
"\u0000\uF0E9\uB0A1\uB0A2\u9EAD\u0000\uB0A3\u0000\u0000\uB0A4" + // 17760 - 17769
"\uDBC2\u0000\u0000\u0000\u0000\uCAFE\u0000\u0000\uF4EA\u0000" + // 17770 - 17779
"\u0000\u0000\uCEB9\u0000\u0000\uD4AA\u0000\uE5CC\u0000\u0000" + // 17780 - 17789
"\u0000\u0000\uC8B8\uC8B9\u0000\u0000\uF7E5\u0000\u0000\u0000" + // 17790 - 17799
"\uCCB2\u0000\u0000\uD3BF\u0000\u0000\u0000\u0000\u0000\u0000" + // 17800 - 17809
"\uF0E7\uE2CC\u0000\uF9E0\u0000\u0000\u0000\u0000\uECD6\u0000" + // 17810 - 17819
"\u0000\uD3E0\u0000\uE4BF\u0000\uFBC0\u0000\uDABE\uE0A9\u0000" + // 17820 - 17829
"\u0000\u0000\u0000\u0000\u0000\u0000\uCCC6\uDCAF\u0000\u0000" + // 17830 - 17839
"\u0000\u0000\u0000\uF0A3\u0000\uEDAA\u0000\u0000\uF2A1\uCEE1" + // 17840 - 17849
"\u0000\u0000\u0000\uD4AB\uCAB3\uCDA6\u0000\uCDC3\uD3DA\u0000" + // 17850 - 17859
"\u0000\u0000\u0000\u0000\u0000\u9CC5\uD9F9\u0000\u0000\uD3EA" + // 17860 - 17869
"\uF5F5\u9CEC\uEFC7\u0000\uDCFB\u0000\u0000\u0000\u0000\u0000" + // 17870 - 17879
"\u0000\u0000\uF8B5\uFDD3\uEBED\uD6DC\u0000\u0000\u0000\u0000" + // 17880 - 17889
"\u0000\uBCB6\uBCB7\u0000\uBCB8\uCDDC\uD9F7\u0000\u0000\u0000" + // 17890 - 17899
"\u0000\u0000\u0000\u9DE4\uF3A3\u0000\uD3EC\uE4E5\u0000\u0000" + // 17900 - 17909
"\u0000\u0000\u0000\u0000\u0000\uE2F5\u9CC0\uE4BC\u0000\u0000" + // 17910 - 17919
"\u0000\u0000\u0000\u0000\uFCC6\u0000\u0000\u0000\uDBC9\u0000" + // 17920 - 17929
"\u0000\u0000\uE4FA\u0000\uEEBA\u0000\u0000\u0000\u9AE6\u0000" + // 17930 - 17939
"\uF8D3\u0000\uACEA\uACEB\uACEC\uACED\uACEE\uACEF\uACF0\uACF1" + // 17940 - 17949
"\uE4CA\u0000\uDCE1\u9BFD\u0000\uF9C8\u0000\u0000\uD7E9\uEDF6" + // 17950 - 17959
"\u0000\u0000\u0000\uDEED\u0000\uF1B2\u0000\uF1B1\u0000\u0000" + // 17960 - 17969
"\u0000\u0000\u0000\uF9CD\u0000\u0000\u0000\uECB9\u0000\u0000" + // 17970 - 17979
"\u0000\u0000\uC8D1\uC8D2\u0000\u0000\uE4DB\u0000\uE1FB\uCBA2" + // 17980 - 17989
"\u0000\u0000\u0000\uE9E3\u0000\uEDCB\uCFE4\u0000\uACE2\uACE3" + // 17990 - 17999
"\uACE4\uACE5\uACE6\uACE7\uACE8\uACE9\uCCF4\u0000\u0000\u0000" + // 18000 - 18009
"\u0000\u0000\u0000\u0000\uD4F8\u9BB9\u0000\uE2D1\u0000\u0000" + // 18010 - 18019
"\u0000\u0000\u9EA4\uCDD4\u0000\u0000\u0000\u0000\u0000\u0000" + // 18020 - 18029
"\u0000\uE6E3\u9BEC\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + // 18030 - 18039
"\uCDAC\uFAB5\u0000\u0000\u0000\u9AB1\u0000\u0000\u0000\uD3BC" + // 18040 - 18049
"\u0000\u0000\u0000\uCAF0\u0000\uEFD0\u0000\uCDB1\u0000\u0000" + // 18050 - 18059
"\u0000\u0000\u0000\uDDDF\u0000\u0000\u0000\uDAF2\u0000\u0000" + // 18060 - 18069
"\u0000\u0000\uA0F9\uC8A2\u0000\u0000\uF6A6\u0000\u0000\u0000" + // 18070 - 18079
"\u0000\u0000\u0000\uEBD7\u0000\u0000\uE0DA\u0000\u0000\u0000" + // 18080 - 18089
"\uEEF7\u0000\u0000\uDFA3\u0000\u0000\u0000\u0000\u0000\u0000" + // 18090 - 18099
"\u9BB1\u0000\u0000\uFDDF\u0000\u0000\u0000\u0000\u0000\u0000" + // 18100 - 18109
"\uE3B2\u0000\u0000\uCBAA\u0000\u0000\u0000\u0000\u9BB4\u0000" + // 18110 - 18119
"\uACDA\uACDB\uACDC\uACDD\uACDE\uACDF\uACE0\uACE1\uCDE9\u0000" + // 18120 - 18129
"\u0000\u0000\u0000\u0000\u0000\u0000\uCDDB\uD8E9\u0000\u0000" + // 18130 - 18139
"\uF8FE\u0000\uCFCC\u0000\u0000\uE2BC\u0000\u0000\uFCED\uECE0" + // 18140 - 18149
"\uD2FE\u0000\uFDE5\uF6A3\u0000\uD9FC\uFDA9\u0000\uE7EE\u0000" + // 18150 - 18159
"\uACD1\uACD2\uACD3\uACD4\uACD5\uACD6\uACD8\uACD9\uD4F9\u0000" + // 18160 - 18169
"\u0000\u0000\u0000\u0000\uF5E2\uE1D3\uDCC0\u0000\u0000\u0000" + // 18170 - 18179
"\u0000\u0000\uD1C8\uD1C9\uF1D2\uD2CC\uCFCB\u0000\u0000\uCABD" + // 18180 - 18189
"\u0000\u0000\uD8C9\u0000\u0000\u0000\u0000\u0000\u0000\uA9E7" + // 18190 - 18199
"\uA9E8\uA9E9\uA9EA\uFBB0\u0000\u0000\u0000\uD8A9\uE5DF\uF9A7" + // 18200 - 18209
"\u0000\uF8C5\u0000\u0000\u0000\u0000\u0000\uDCFA\u0000\uACBA" + // 18210 - 18219
"\uACBB\uACBC\uACBD\uACBE\uACBF\uACC0\uACC1\uCEBD\u0000\u0000" + // 18220 - 18229
"\u0000\u0000\u0000\u0000\u0000\uE0A4\uDCBF\u0000\u0000\u0000" + // 18230 - 18239
"\u0000\u0000\u0000\u0000\uD0DC\uE6AE\u0000\u0000\u0000\u0000" + // 18240 - 18249
"\u0000\uEFB6\u0000\uF7CE\uFABE\u0000\u0000\u0000\u0000\u0000" + // 18250 - 18259
"\u0000\uF5C5\uEEE0\u0000\uACB2\uACB3\uACB4\uACB5\uACB6\uACB7" + // 18260 - 18269
"\uACB8\uACB9\uF3C9\u0000\u0000\uE4BB\u0000\u0000\u0000\u0000" + // 18270 - 18279
"\u9ADF\uD6BB\uDED6\u0000\u0000\uECBE\u0000\u0000\u0000\uE5B4" + // 18280 - 18289
"\uCDC8\uEEC8\uF9A6\u0000\u0000\u0000\u0000\u0000\u0000\uDFBD" + // 18290 - 18299
"\u9BF0\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uDCDC\uEAC3" + // 18300 - 18309
"\u0000\uEFB4\u0000\u0000\u0000\uD7BE\u0000\uF9EA\uD1CE\uEED4" + // 18310 - 18319
"\u0000\uD4D2\uD9A3\uFDA8\uD7D9\uCCF2\uF7DD\u0000\uDEBA\u0000" + // 18320 - 18329
"\u0000\u0000\u0000\uF6E1\u0000\u0000\u0000\u0000\uC3BC\uC3BD" + // 18330 - 18339
"\u0000\u0000\uEABD\uE6FE\u9AFB\uF7C4\uF5AD\u0000\uD9E0\uFAFA" + // 18340 - 18349
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uD7EA\uD6C5\u0000" + // 18350 - 18359
"\u0000\u0000\u0000\u0000\u0000\u0000\uD5C5\uE7E8\uE8D7\uDAF8" + // 18360 - 18369
"\uD4CB\u0000\u0000\u0000\uF7F6\uE2CE\u0000\uE9F5\u0000\uE1EB" + // 18370 - 18379
"\u0000\u0000\u0000\uFCE1\uEDB0\uFDD1\uF6BB\u0000\u0000\uD0D9" + // 18380 - 18389
"\u0000\u0000\uDDD2\uF7F4\uE7DC\uE4A5\uFBE1\uFAED\uF0A2\uCCF1" + // 18390 - 18399
"\u0000\uFAA3\uE2F7\u0000\uDEC9\u0000\u0000\u0000\u0000\u0000" + // 18400 - 18409
"\u0000\u0000\uDBD7\uCAEA\u0000\u0000\uCFD4\u0000\uF8BD\u0000" + // 18410 - 18419
"\u0000\uDDB3\uD4EC\u0000\u0000\uF2B9\u0000\uDFB7\uCFD3\u0000" + // 18420 - 18429
"\u0000\u0000\u0000\u0000\u9DDB\u0000\uF7BB\uF2EA\uDEC8\uE9D3" + // 18430 - 18439
"\u0000\u0000\u0000\u0000\uC1D6\uC1D7\u0000\u0000\uDFC6\u0000" + // 18440 - 18449
"\u0000\u0000\u0000\u0000\u0000\uE3DA\u0000\uFCD9\u9DD1\u0000" + // 18450 - 18459
"\u0000\u0000\u0000\u0000\u0000\u0000\uD9AD\uD6C4\u9CCA\u0000" + // 18460 - 18469
"\u0000\u0000\u0000\u0000\u0000\uE5F2\u0000\u0000\uD0F4\uDFAC" + // 18470 - 18479
"\u0000\uD6DA\u0000\u0000\u0000\u0000\u0000\uBBCE\u0000\u0000" + // 18480 - 18489
"\u0000\uFCE0\uD7C8\uFDAD\u0000\u0000\u0000\uECE2\u0000\u9CFC" + // 18490 - 18499
"\u0000\u0000\uF3EC\u0000\u0000\u0000\u0000\uDEA1\u0000\uE9D1" + // 18500 - 18509
"\uF3A9\uD0E0\uE9D2\u0000\uDAE3\u0000\u0000\uE1B4\u0000\u0000" + // 18510 - 18519
"\u0000\u0000\uF4D3\u0000\uACAA\uACAB\uACAC\uACAD\uACAE\uACAF" + // 18520 - 18529
"\uACB0\uACB1\uE2CD\u0000\u0000\u0000\u9CAE\u0000\uEFFD\uF2E8" + // 18530 - 18539
"\uDDD4\u0000\uEAA3\u0000\u0000\u0000\uD6C3\uD6F4\uE9EB\uE9EC" + // 18540 - 18549
"\uE0E4\u0000\u0000\u0000\u0000\uDAA7\uEDCD\uE4D2\u0000\u0000" + // 18550 - 18559
"\uEAA9\uE4BA\uF3A2\uCDD2\uE2CB\u0000\uFACF\u0000\u0000\u0000" + // 18560 - 18569
"\u0000\u0000\u9FC9\u0000\u0000\u0000\uFBA1\u0000\u0000\u0000" + // 18570 - 18579
"\uE5E9\uE9EE\uE4F6\uD0C0\u0000\uF0B7\uEEA1\u0000\u0000\u0000" + // 18580 - 18589
"\uCBAD\u0000\uF9B0\u0000\u0000\u0000\uE9FE\u0000\u0000\u0000" + // 18590 - 18599
"\u0000\uE4ED\u0000\u0000\u0000\u0000\uA0AF\uC1C5\u0000\uC1C6" + // 18600 - 18609
"\uD7C1\u0000\u0000\u0000\u0000\uE5D5\u0000\u0000\uE2BB\u0000" + // 18610 - 18619
"\uF7AD\u0000\u0000\u0000\uF8E1\uEBE4\u0000\u0000\uF2E7\u0000" + // 18620 - 18629
"\uD7D5\uD4B6\uF9E8\uF9DA\u0000\u0000\u0000\u0000\u0000\u0000" + // 18630 - 18639
"\u0000\uFDD0\uF6ED\u0000\uF9AE\u0000\uDDBE\u0000\u0000\u0000" + // 18640 - 18649
"\uF1B7\uEEF8\u0000\u0000\u0000\uD9D9\u9CCB\u0000\uF8A1\u0000" + // 18650 - 18659
"\u0000\u0000\uE8D6\u0000\uF6B2\u0000\u0000\u0000\u0000\uCFF0" + // 18660 - 18669
"\uF9BD\u0000\uACA1\uACA2\uACA3\uACA4\uACA5\uACA6\uACA8\uACA9" + // 18670 - 18679
"\uD0B1\u9BC5\u0000\u0000\u0000\uD5EF\u0000\u0000\uCEDD\uEBC0" + // 18680 - 18689
"\u0000\uFDA2\u0000\u0000\u0000\uEEED\u0000\u0000\u0000\uECEB" + // 18690 - 18699
"\uDEC5\uCBA6\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uD5A1" + // 18700 - 18709
"\uDAA6\u0000\u0000\uE0EC\u0000\u0000\u0000\u0000\uD3F7\u0000" + // 18710 - 18719
"\u0000\u0000\u0000\uC2EB\uA0C3\u0000\uC2EC\u9BF8\u0000\u9AF6" + // 18720 - 18729
"\u0000\u0000\u0000\u0000\u0000\uBBAD\uBBAE\u0000\uBBAF\uF7A1" + // 18730 - 18739
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uEECB\uF1A4\u9AEC" + // 18740 - 18749
"\u0000\u0000\u0000\u0000\u0000\u0000\uF5CD\u0000\uF1F2\uFAC7" + // 18750 - 18759
"\uECF0\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uEBFB\uE7CC" + // 18760 - 18769
"\u0000\uD6A8\uCEA7\u0000\uD4B5\u0000\u0000\uCCB7\uDBB8\u0000" + // 18770 - 18779
"\u0000\u0000\u0000\uD0E9\uD9E1\u0000\u0000\uE0B8\u0000\u0000" + // 18780 - 18789
"\uCDD1\uF3B9\uEFFC\uD1C4\uEFB1\u0000\uD1C5\u0000\uD0DE\u0000" + // 18790 - 18799
"\uD7D8\u0000\uFDA7\u0000\u0000\u0000\u0000\uEAAB\uF5DF\u0000" + // 18800 - 18809
"\uEEB6\u0000\u0000\u0000\uE2F6\uD3CA\uF5DE\u0000\u0000\u0000" + // 18810 - 18819
"\u0000\u0000\u0000\u0000\uD9AB\uCBEA\u0000\u0000\u0000\uCBBC" + // 18820 - 18829
"\u0000\u0000\u0000\uE5F5\u0000\u0000\u0000\u0000\u0000\uB1D4" + // 18830 - 18839
"\u0000\u0000\u0000\uD4E5\u0000\u0000\u0000\uF9C3\uD9AF\u0000" + // 18840 - 18849
"\u0000\u0000\uF9E7\u0000\u0000\u0000\uDEAE\u0000\u0000\u0000" + // 18850 - 18859
"\u0000\u0000\uB1AB\uB1AC\u0000\u0000\uCDC6\uF2B6\u0000\u0000" + // 18860 - 18869
"\uDDFE\u0000\u0000\uD4A9\u0000\u0000\u0000\u0000\uCDC2\uE7DA" + // 18870 - 18879
"\uEBDE\u0000\u0000\uF5C8\u0000\uD4DE\u0000\u0000\uEBBF\u0000" + // 18880 - 18889
"\uD7CE\uD1BF\u0000\u0000\u0000\uD0D1\uCBBF\u0000\uEDA4\u0000" + // 18890 - 18899
"\u0000\uFADF\u0000\u0000\u0000\u0000\u0000\u0000\uE4BD\u0000" + // 18900 - 18909
"\u0000\uDBE1\u0000\u0000\uE5C9\u0000\uEDB4\u0000\uECD4\uEACB" + // 18910 - 18919
"\u0000\u0000\uCABF\uD5B0\u0000\uCFE9\u9AC4\u0000\u0000\u0000" + // 18920 - 18929
"\u0000\u0000\u9BC0\u0000\uE0D9\u0000\u0000\u0000\u0000\u0000" + // 18930 - 18939
"\u0000\uD9D6\uCBA5\u0000\u0000\u0000\u0000\uCBE9\u0000\u0000" + // 18940 - 18949
"\uCEEE\u0000\u9BCD\uECCF\u0000\u0000\u0000\uE7D1\uD2AC\u0000" + // 18950 - 18959
"\uCEF9\u0000\u0000\uE0FD\u0000\u0000\uD8F8\u0000\u0000\u0000" + // 18960 - 18969
"\uBDD7\uBDD8\uBDD9\u0000\u0000\uD6A1\uFDBF\u0000\uFCD3\u0000" + // 18970 - 18979
"\uEFA1\u0000\uEFBF\u0000\u0000\u0000\u0000\u0000\uCECF\u0000" + // 18980 - 18989
"\uA5F7\uA5F8\u0000\u0000\u0000\u0000\u0000\u0000\uCCDD\u0000" + // 18990 - 18999
"\u0000\u9CE4\u0000\uFDDE\uCAC0\u0000\u0000\u0000\uD9C3\uD0E8" + // 19000 - 19009
"\u0000\u0000\u0000\uE0B4\u0000\u0000\u0000\u0000\uC7FD\u0000" + // 19010 - 19019
"\u0000\u0000\uD7BC\uCCE3\u0000\u0000\uE6DB\uCCA2\uF7FE\uDFBC" + // 19020 - 19029
"\u0000\u9DD0\u0000\u0000\uEBCD\uEFF9\u0000\u0000\u0000\uDDBC" + // 19030 - 19039
"\uF6DC\u0000\u0000\uF8BB\u0000\uE8D1\u0000\u0000\u0000\u0000" + // 19040 - 19049
"\uECF2\u0000\u0000\u0000\u0000\uC0CC\uC0CD\u0000\u0000\uF2D7" + // 19050 - 19059
"\u0000\uCAF8\uDAEF\u9AC2\u0000\uD6D4\uD7ED\uD1D1\u0000\u0000" + // 19060 - 19069
"\u0000\u0000\u0000\uE1F2\uE5D4\u0000\u0000\u0000\u0000\u0000" + // 19070 - 19079
"\u0000\uF3FA\u9DFD\u0000\uE1A5\u0000\u0000\u0000\u0000\u0000" + // 19080 - 19089
"\uBAC4\u0000\u0000\u0000\uD8DA\u9EA5\u0000\u0000\u0000\u0000" + // 19090 - 19099
"\uC2D6\u0000\u0000\u0000\uECBC\u0000\u0000\uE5AD\u0000\uE7ED" + // 19100 - 19109
"\uFDC1\uDAE2\u0000\u0000\uD8B3\u0000\u0000\uDCE6\u0000\u0000" + // 19110 - 19119
"\uDED2\u0000\u0000\uEDE2\uDFAB\u0000\u0000\u0000\u0000\u0000" + // 19120 - 19129
"\u0000\u0000\uD6A4\uDDBB\u0000\u0000\u0000\u0000\uCEAC\u0000" + // 19130 - 19139
"\u0000\uE6BA\u0000\u0000\uCDA9\u0000\u0000\u0000\uA1F8\uA1F9" + // 19140 - 19149
"\u0000\u0000\uA1F6\uA1F7\uEED0\u0000\u0000\u0000\u0000\u0000" + // 19150 - 19159
"\u0000\u0000\uEEE1\uF7C6\uCFC8\u0000\u0000\u0000\uE1D0\u0000" + // 19160 - 19169
"\u0000\uE3B1\uFCEB\uCDA8\u0000\uCCB6\u0000\u0000\uEBF7\u0000" + // 19170 - 19179
"\u0000\u0000\u0000\u0000\u0000\uF0E8\u0000\uDDC0\uF5BE\u0000" + // 19180 - 19189
"\uDEF7\u0000\u0000\u0000\u0000\uCAFB\uD8B1\u0000\uDCAB\u0000" + // 19190 - 19199
"\u0000\u0000\u0000\uD5A4\uE9AD\uD8E4\uFAB3\uE2C5\uFCBD\u0000" + // 19200 - 19209
"\u0000\uECC4\uE0D4\u0000\uEBB6\u0000\uD7A1\uCBE8\u0000\uF9AD" + // 19210 - 19219
"\u9CDD\uEEEA\u0000\u0000\u0000\uF0E4\uF3B4\uD4EE\uEAC0\uE1CF" + // 19220 - 19229
"\u0000\uCCBA\u0000\u0000\u0000\u0000\u9BE5\u0000\uF6E6\u0000" + // 19230 - 19239
"\u0000\uDBE5\u0000\uDDDE\u0000\u0000\uD9F0\uE9A3\uF9C6\uFCDA" + // 19240 - 19249
"\u0000\uD4B3\uD3B9\uEADE\u0000\u0000\uF0FD\u0000\u0000\u0000" + // 19250 - 19259
"\u0000\u0000\uD7AC\uECEF\u0000\u0000\u0000\uF9BA\u0000\uEBB5" + // 19260 - 19269
"\u0000\uCFA1\uE4A8\u0000\uF4B6\uECFE\u0000\u0000\uE3AE\uF0E3" + // 19270 - 19279
"\uF1E4\uDCF1\uD6A7\u0000\u0000\u0000\u0000\uD0F5\u0000\u0000" + // 19280 - 19289
"\uE8ED\uD0D2\uF5EF\uCFC7\u0000\u0000\uD4B2\uCCEF\u0000\uD4E8" + // 19290 - 19299
"\uFBAD\u0000\u0000\uF8E7\u0000\uE1CE\u0000\uF7E2\uF7DC\uE1EA" + // 19300 - 19309
"\uCEC1\uD4B1\u0000\uFDB1\uE6BD\u0000\uEDDD\uCEC4\u0000\uCBA1" + // 19310 - 19319
"\u0000\u0000\u0000\u0000\uC1B5\u0000\u0000\u0000\uF4D7\uCCA1" + // 19320 - 19329
"\u9ABB\u0000\uCFBA\u9BD4\uEEE9\u9AD9\u0000\u0000\uF5DA\u0000" + // 19330 - 19339
"\u0000\uF2DB\uE4FC\u0000\u0000\u0000\u0000\u0000\uB6CF\u0000" + // 19340 - 19349
"\u0000\u0000\uA1EC\uA1ED\u0000\u0000\u0000\u0000\uBFE4\uBFE5" + // 19350 - 19359
"\u0000\u0000\uF1F7\u0000\u0000\u0000\uE8B8\u0000\u0000\uDEB4" + // 19360 - 19369
"\u0000\u0000\u0000\u0000\u0000\u0000\uFBE2\u0000\uCDD3\uE2FB" + // 19370 - 19379
"\u0000\uCCA6\u0000\u0000\u0000\u0000\uDABB\uF2E3\uE9B4\uD2DC" + // 19380 - 19389
"\u0000\u0000\u0000\u0000\u0000\uB9F6\uB9F7\u0000\u0000\uCBB5" + // 19390 - 19399
"\uD8D1\u0000\uF4CE\uF3F7\u0000\u0000\uDCBA\u0000\u9DD9\uCCB4" + // 19400 - 19409
"\u0000\u0000\u0000\uB2FA\uB2FB\uB2FC\u0000\uB2FD\uDCA9\u0000" + // 19410 - 19419
"\u0000\u0000\u0000\uDEF6\u9BD0\uDCAA\uE2C3\uDCDE\u0000\uDCDF" + // 19420 - 19429
"\u0000\u0000\uEFAD\uE6AB\uF5EE\u0000\u0000\uCABB\u0000\u0000" + // 19430 - 19439
"\uE3DC\u0000\uDCD3\u0000\u0000\u0000\u0000\uDDE2\uFBF9\uDDC1" + // 19440 - 19449
"\uCFC6\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uF6C5\uF4B2" + // 19450 - 19459
"\u0000\u0000\u0000\u9DBA\u0000\u0000\u0000\uE7F2\uEDDF\u0000" + // 19460 - 19469
"\u0000\uCACB\u0000\uFDD6\u0000\u0000\u0000\u0000\uF8D1\u0000" + // 19470 - 19479
"\uF8D2\uD4B0\uF3B2\uFBB7\u0000\u0000\u0000\u0000\u0000\uB9E3" + // 19480 - 19489
"\uB9E4\u0000\uB9E5\uEBB2\u0000\u0000\u0000\u0000\uF1A2\u9DB0" + // 19490 - 19499
"\u0000\uCFE8\u0000\uEDC3\uD0B2\u0000\u0000\uCEFE\uDAA8\uF4C2" + // 19500 - 19509
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u9AD6\uCEA5\u0000" + // 19510 - 19519
"\u9ACE\u0000\u0000\u0000\u0000\uD6D8\uF5D9\u0000\u0000\u0000" + // 19520 - 19529
"\u0000\u0000\u0000\u0000\u9BA5\uF1CB\u0000\u0000\uD0AF\uDDB9" + // 19530 - 19539
"\u0000\u0000\uD1C3\uF1FC\u0000\uF3C7\u9CBF\u0000\uE0EB\u0000" + // 19540 - 19549
"\u0000\uCCB5\u0000\u0000\u0000\u0000\u0000\uCFBD\uDBD3\u0000" + // 19550 - 19559
"\uFAE7\uD8E3\uF4C1\u0000\uDDB7\u0000\uCAEB\uD9E2\u0000\uFDB2" + // 19560 - 19569
"\u0000\uE3AD\uD6CC\uD9B4\uCAB9\u0000\uEEE4\u0000\u0000\u0000" + // 19570 - 19579
"\u0000\u0000\uB9C2\u0000\u0000\u0000\uE1F7\u0000\u0000\u0000" + // 19580 - 19589
"\u0000\u0000\uDABD\u0000\u0000\u0000\uDAB7\u0000\u0000\u0000" + // 19590 - 19599
"\u0000\uA1C9\u0000\u0000\u0000\u0000\uBFD6\uBFD7\u0000\u0000" + // 19600 - 19609
"\uF7D6\uDEEA\uCBB4\u0000\u0000\uEFBE\u0000\uCAA5\u0000\u0000" + // 19610 - 19619
"\uD6AB\uD0C2\u0000\u0000\u0000\uEFEC\u0000\u0000\u0000\u0000" + // 19620 - 19629
"\uC7DC\uC7DD\u0000\uC7DE\uF9C5\uDDD3\uD6F1\uECFC\uFCF0\u0000" + // 19630 - 19639
"\u0000\uEDC0\uD3E8\u0000\u0000\uDEA8\uF4E4\uECC2\u0000\uD9F5" + // 19640 - 19649
"\uE1AE\u0000\u0000\uECC3\uCFFE\u0000\uF8BF\uD8E2\uFCA7\uF7FC" + // 19650 - 19659
"\uF7B1\uCEBB\uF4A1\u0000\u0000\uEECD\uDDB6\uEEAF\uCDF8\u0000" + // 19660 - 19669
"\u0000\u0000\u0000\uDEB8\uD1C2\u0000\uF9A5\u0000\uE8D5\u0000" + // 19670 - 19679
"\u0000\u0000\uE1F6\uDECC\u0000\u0000\uFCDE\u0000\uDBF9\uD7B1" + // 19680 - 19689
"\u0000\u0000\u0000\uCBFC\u0000\u0000\uCDFB\uF6D6\u0000\uE7F5" + // 19690 - 19699
"\uE8EF\uE3F9\uD2BB\uE2C2\u0000\uF3D8\uE5D3\u0000\u0000\uF3D9" + // 19700 - 19709
"\u0000\uCFE7\uF3CB\uEDA9\uCABE\u0000\u0000\u0000\u0000\uC0F7" + // 19710 - 19719
"\u0000\u0000\u0000\uE0FC\uD4A8\u0000\uEDD3\uD8EF\uD4C1\u0000" + // 19720 - 19729
"\u0000\u0000\u0000\u0000\u0000\u0000\u9DCA\uECA1\u0000\u0000" + // 19730 - 19739
"\u0000\uCCB9\u0000\u0000\uFBDE\uE3DB\u0000\uD3C9\u0000\uDCCF" + // 19740 - 19749
"\u0000\u0000\u0000\uE7F0\u0000\uD0EE\u0000\u0000\uF3AA\uD9C8" + // 19750 - 19759
"\u0000\u0000\uEEE3\uD7BD\u0000\u0000\u0000\uF4C9\u0000\u0000" + // 19760 - 19769
"\u0000\u0000\u0000\uCDAE\u0000\u0000\u0000\u9CCD\u0000\u0000" + // 19770 - 19779
"\u0000\u0000\uC8E2\u0000\u0000\uC8E3\uE9AA\u0000\u0000\u0000" + // 19780 - 19789
"\u0000\u0000\u0000\u0000\uCBCD\uDACD\u0000\u0000\u0000\uF9CC" + // 19790 - 19799
"\u0000\uE1DA\uDBBF\uD9C7\uE4D7\uEADD\u0000\uD4F7\u0000\u0000" + // 19800 - 19809
"\u0000\uD5E5\u0000\u0000\u0000\u0000\u0000\u9DE5\u0000\u0000" + // 19810 - 19819
"\u0000\uCAE5\u0000\u0000\u0000\uDCA1\uF0B3\u0000\uE5EC\u0000" + // 19820 - 19829
"\u0000\u0000\uD1E7\u0000\uD3F0\u9DC3\u0000\u0000\u0000\u0000" + // 19830 - 19839
"\uF0A4\uE1EC\uE2C1\u0000\uCEA4\u0000\u0000\u0000\u0000\u0000" + // 19840 - 19849
"\uB8EF\u0000\u0000\u0000\uDACF\u0000\uDCD4\u0000\uDCA6\u0000" + // 19850 - 19859
"\uE7D4\u0000\uCACA\u0000\u0000\u0000\uD9FB\u0000\uA5F0\uA5F1" + // 19860 - 19869
"\u0000\uA5F2\uA5F3\uA5F4\uA5F5\uA5F6\uFCEF\u0000\uE0E3\u0000" + // 19870 - 19879
"\u0000\u0000\u0000\u0000\uB8E2\uB8E3\u0000\uB8E4\uE1A4\uCDAB" + // 19880 - 19889
"\u0000\uD9F4\uE8A6\uCDCE\uE1E9\u0000\uD3EF\u0000\u0000\uECD3" + // 19890 - 19899
"\u0000\u0000\uDDC2\uEFB7\uEBAF\u0000\u0000\u0000\u0000\u0000" + // 19900 - 19909
"\uE5DE\u0000\uF4C8\uE8EA\uF5F3\u0000\u0000\uF9DE\u0000\u0000" + // 19910 - 19919
"\uFAA9\u0000\uE1DD\u0000\u0000\u0000\u0000\uC2E8\u0000\u0000" + // 19920 - 19929
"\u0000\uE3ED\u0000\uE8C2\u0000\uEDF5\uFDFE\uFCA5\uFAB1\uDFD9" + // 19930 - 19939
"\u0000\uE0D2\u0000\u0000\uE2B6\u0000\u0000\u0000\u0000\uEFF1" + // 19940 - 19949
"\u0000\uFCC5\uCBC2\u0000\u0000\u0000\u0000\uFDD5\u0000\uA5E8" + // 19950 - 19959
"\uA5E9\uA5EA\uA5EB\uA5EC\uA5ED\uA5EE\uA5EF\uE7C9\u0000\uE2F3" + // 19960 - 19969
"\uE7E1\u0000\u0000\uE3CB\u0000\uCEAE\u0000\u0000\u0000\u0000" + // 19970 - 19979
"\uD9A2\u0000\u0000\uD2EC\u0000\u0000\u0000\u0000\u0000\u0000" + // 19980 - 19989
"\uF2F4\u0000\u0000\uFDF0\u0000\uE0BD\uCEE3\u0000\u0000\u0000" + // 19990 - 19999
"\uF0FE\u0000\u0000\u0000\u0000\u9BAC\uD7CF\uEBEA\uFDEB\u0000" + // 20000 - 20009
"\uA5D7\uA5D8\u0000\u0000\u0000\u0000\u0000\u0000\uE3A5\u0000" + // 20010 - 20019
"\u0000\uE7D5\uF5BF\uCFA2\uCDAF\uCFA3\u0000\u0000\uCDB0\uF1FE" + // 20020 - 20029
"\uD0A3\uE1AF\uF8A3\u0000\uCAA6\uDEF1\u0000\u0000\u0000\uF0DF" + // 20030 - 20039
"\uF8C4\u0000\u0000\uD5DC\uF3C4\uCBD7\u0000\u0000\u0000\u0000" + // 20040 - 20049
"\uA8F7\uA8F8\u0000\u0000\u0000\u9AAB\u0000\u0000\u0000\u0000" + // 20050 - 20059
"\u0000\uF0A1\u0000\uDEAA\u0000\uD0ED\u0000\u0000\u0000\u0000" + // 20060 - 20069
"\u0000\uE5F7\u0000\uA5D0\uA5D1\u0000\uA5D2\uA5D3\uA5D4\uA5D5" + // 20070 - 20079
"\uA5D6\uD1C0\u0000\u0000\uE8C5\u0000\uE4B8\u0000\uE1E8\uCDAA" + // 20080 - 20089
"\u0000\uE3F2\u0000\uFBF7\u0000\uF7D0\u0000\uEEF0\u0000\u0000" + // 20090 - 20099
"\u0000\uCCC2\u0000\u0000\u0000\uEAD4\u0000\u0000\u0000\u0000" + // 20100 - 20109
"\uA0EB\u0000\u0000\u0000\uDFA7\u0000\uDFE7\uE1C1\u0000\uA5C8" + // 20110 - 20119
"\uA5C9\uA5CA\uA5CB\uA5CC\uA5CD\uA5CE\uA5CF\uE5EB\u0000\uEFF4" + // 20120 - 20129
"\uDDB5\u0000\u0000\u0000\u0000\uD0F0\u0000\u0000\u0000\u0000" + // 20130 - 20139
"\uC2AB\uC2AC\u0000\uC2AD\uF5BA\u0000\u0000\u0000\u0000\u0000" + // 20140 - 20149
"\u0000\u0000\uD9DF\uCEBA\u0000\u0000\u0000\u0000\u0000\u0000" + // 20150 - 20159
"\u0000\uE2B4\uD7AE\u0000\u0000\uE0E1\u0000\u0000\u0000\u0000" + // 20160 - 20169
"\uFAC6\u0000\u0000\u0000\u0000\uA0B9\u0000\u0000\u0000\uDEFB" + // 20170 - 20179
"\uD0BB\uD5B7\uEEF1\u0000\u0000\uCADB\u0000\u0000\u0000\u0000" + // 20180 - 20189
"\u0000\uFCD7\uEADC\uDBD2\u0000\u0000\u0000\u0000\u0000\u0000" + // 20190 - 20199
"\uF4A8\u0000\uDCF8\u0000\uEEEF\uD5D7\uEAE4\uF8A2\uCDEB\uD7BF" + // 20200 - 20209
"\uFBB1\u0000\uA2A8\uA2AB\uA2AA\uA2AD\uA2A6\uA2A9\u0000\u0000" + // 20210 - 20219
"\uDDE4\uF0EF\uF6F1\uFAF0\u0000\u0000\uD1F5\uCAE8\u0000\uF8E6" + // 20220 - 20229
"\uDCCE\u0000\u0000\u0000\u0000\uDECB\uF6B8\u0000\u0000\u0000" + // 20230 - 20239
"\u9DE0\u0000\u0000\u0000\uE5A7\uD5D2\uD5A3\u0000\u0000\u0000" + // 20240 - 20249
"\u0000\uF0B2\u0000\u0000\uDEE8\u0000\u0000\u0000\u0000\u0000" + // 20250 - 20259
"\u0000\uA0DB\u0000\u0000\uD7B8\u0000\u0000\u0000\u0000\u0000" + // 20260 - 20269
"\u0000\u9AD4\u9CE0\u0000\uE0BB\uCEC3\u0000\uD0BA\uF7BA\uD8F3" + // 20270 - 20279
"\uF7CD\u0000\uA2B0\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + // 20280 - 20289
"\u0000\uA2A7\uDEA5\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + // 20290 - 20299
"\uE6DA\uCAB7\u0000\u0000\uD3E7\u0000\uF8E5\u0000\u0000\uCEB7" + // 20300 - 20309
"\u0000\u0000\u0000\u0000\u0000\u0000\uC2C6\u0000\u0000\uE0C4" + // 20310 - 20319
"\u0000\uCFB9\u0000\uD5CA\uD7E2\uE2AF\uE1F1\u0000\uD2A4\u0000" + // 20320 - 20329
"\u0000\u0000\u0000\uF5FB\uF8FA\u0000\u0000\uDFB9\u0000\u0000" + // 20330 - 20339
"\u0000\u0000\uF9E1\u0000\u0000\u0000\u0000\uC1ED\u0000\u0000" + // 20340 - 20349
"\u0000\uD8F1\u0000\uD4CF\u0000\u0000\u0000\uE6B9\u0000\u0000" + // 20350 - 20359
"\u0000\u0000\uC7B4\u0000\u0000\u0000\uD7AA\u0000\u0000\u0000" + // 20360 - 20369
"\u0000\uC7C1\uA0EE\u0000\u0000\uE1AB\u0000\u0000\u0000\u0000" + // 20370 - 20379
"\u0000\u0000\uBCD1\u0000\u0000\uE0FB\u0000\u0000\u0000\uEFEA" + // 20380 - 20389
"\uFADE\u0000\uE8B4\uEBC3\u0000\uEAAA\uFAFC\uF5F6\uF0BC\uFDD4" + // 20390 - 20399
"\uFAEC\u0000\u0000\u0000\u0000\u0000\uF1EB\u0000\uEBF0\uF1D6" + // 20400 - 20409
"\u0000\u0000\uE5E2\u0000\uCCCC\u0000\uA9A8\uA8A9\uA9A9\u0000" + // 20410 - 20419
"\u0000\u0000\u0000\u0000\uDDBD\u0000\u0000\u0000\uF9C1\u0000" + // 20420 - 20429
"\u0000\u0000\u0000\uC5F0\u0000\u0000\u0000\uFBF2\u0000\uDBF6" + // 20430 - 20439
"\u0000\uDEDF\uDAF6\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + // 20440 - 20449
"\uF5B8\u9CAF\u0000\u0000\u0000\uF6DE\u0000\u0000\u9BB6\uE8C4" + // 20450 - 20459
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u9BC2\uE3A4\u0000" + // 20460 - 20469
"\u0000\u0000\u0000\u0000\u0000\u0000\uCFEF\u9BD7\u0000\u0000" + // 20470 - 20479
"\u0000\u0000\u0000\uF9C4\u0000\uDFA1\uDDE1\u0000\u0000\u0000" + // 20480 - 20489
"\u0000\u0000\u0000\uFCA1\uEFEE\uDCD8\uF2BB\u0000\uDEA4\u0000" + // 20490 - 20499
"\uDACC\u0000\u0000\u0000\uF3FC\u0000\u0000\uEEA2\u0000\u0000" + // 20500 - 20509
"\uE1C5\u0000\u0000\u0000\u0000\u0000\u0000\uB9A3\u0000\uB9A4" + // 20510 - 20519
"\uE8A5\u9BDD\u0000\u0000\u0000\u0000\u0000\u0000\uF4A2\u0000" + // 20520 - 20529
"\uF1D7\u0000\uCED3\u0000\u0000\u0000\u0000\uDCF7\u0000\u0000" + // 20530 - 20539
"\uEED5\u0000\u0000\u0000\u0000\uF9F4\u0000\uA9A7\u0000\u0000" + // 20540 - 20549
"\u0000\u0000\u0000\u0000\uA8A8\uF5B9\u0000\uDCF0\uE3F1\u0000" + // 20550 - 20559
"\u0000\u0000\u0000\uCFD6\u0000\uD7F0\u0000\uEBE1\uF9CB\u0000" + // 20560 - 20569
"\u0000\u0000\uCBF3\uF4A5\u0000\u0000\uF3D7\u0000\u0000\u0000" + // 20570 - 20579
"\uDCBD\u0000\uCCE5\uFDB9\u0000\u0000\u0000\u0000\u0000\u0000" + // 20580 - 20589
"\u0000\uD0B4\uFDBC\uDFB1\uE3EF\u0000\u0000\u0000\u0000\uE0A3" + // 20590 - 20599
"\u9CDF\u0000\u0000\u0000\uDADD\u0000\u0000\uDAB9\uCFF2\uF7B9" + // 20600 - 20609
"\uD9F3\u0000\u0000\uE1CB\u0000\u0000\uCFE2\uCDF6\u0000\u0000" + // 20610 - 20619
"\uEFF0\u0000\uF4BE\u9CE1\uFBB6\u0000\u0000\u0000\u0000\u0000" + // 20620 - 20629
"\u0000\uA1AD\u0000\u0000\u0000\uE9D0\u0000\u0000\u0000\u0000" + // 20630 - 20639
"\u0000\u9BE3\u0000\u0000\u0000\uD5B4\u0000\u0000\u0000\u0000" + // 20640 - 20649
"\uC6D9\uC6DA\u0000\u0000\uE8B1\u0000\uFCAE\u0000\u0000\u0000" + // 20650 - 20659
"\u0000\uA0FD\u0000\u0000\u0000\uA0B7\uC1E1\u0000\u0000\u0000" + // 20660 - 20669
"\uA0CC\uC3C6\uA0CD\u0000\u0000\uFADD\u0000\u0000\u0000\u0000" + // 20670 - 20679
"\u0000\u0000\uFCBF\u0000\u0000\uE2AB\uF3E8\u0000\u0000\u0000" + // 20680 - 20689
"\u0000\u0000\uB4BC\u0000\u0000\u0000\u9BDE\u0000\uD4E9\u0000" + // 20690 - 20699
"\u0000\uE3FE\uD1AA\uE8AA\u0000\uEAB6\uF9FA\uE6CC\uDFB8\u0000" + // 20700 - 20709
"\uEAA5\u0000\u0000\u0000\uD7AD\u9DBB\uE1E0\u0000\uD9AC\u0000" + // 20710 - 20719
"\uF5EB\u0000\uE0B6\u0000\uF7DE\u0000\u0000\u0000\u0000\u0000" + // 20720 - 20729
"\u0000\u0000\uA9FA\uF1FA\u9AB2\u0000\uE5B6\uF3EF\u0000\u0000" + // 20730 - 20739
"\uFBDA\uE2BD\u0000\u0000\u0000\uE3C8\u0000\u0000\u0000\uD6F6" + // 20740 - 20749
"\u0000\u0000\u0000\uEACA\u0000\u9CAA\u0000\u0000\u0000\uF6B0" + // 20750 - 20759
"\uEFCF\uE9CF\u0000\uA9AA\u0000\u0000\u0000\u0000\u0000\uA9AD" + // 20760 - 20769
"\u0000\uC8E4\u0000\u0000\u0000\u0000\u0000\u0000\uF1D1\u0000" + // 20770 - 20779
"\u0000\u0000\uF0BE\uD2BD\uCCA4\u0000\u0000\u0000\u0000\uC1AA" + // 20780 - 20789
"\uC1AB\u0000\uC1AC\uEBAD\u0000\u0000\u0000\u9CBE\uD5AA\u0000" + // 20790 - 20799
"\u0000\uCEA1\uF5A9\u0000\u0000\uDDF9\u0000\u0000\uE2AD\u0000" + // 20800 - 20809
"\u0000\u0000\u0000\u0000\u0000\uF5E3\u0000\u0000\uF2D1\u9CB4" + // 20810 - 20819
"\u0000\u0000\u0000\uE9C1\u0000\uCCA7\uEAC9\u0000\u0000\u0000" + // 20820 - 20829
"\u0000\u0000\uF8B6\uCDCA\uD7D4\uDEA3\u0000\uE4E0\u0000\u0000" + // 20830 - 20839
"\u0000\uE7EC\uEEEE\u9AC6\uF3F0\u0000\uDFBF\uE3EE\u0000\u0000" + // 20840 - 20849
"\u0000\u0000\u0000\uE8D4\u0000\uCBDA\u0000\uE7D2\uD7C3\uF6F0" + // 20850 - 20859
"\uE8DE\u0000\u0000\uF2EC\u0000\u0000\uFAEE\u0000\u0000\u0000" + // 20860 - 20869
"\uE4FD\u0000\u0000\uE3EC\u0000\uA9A3\u0000\u0000\u0000\u0000" + // 20870 - 20879
"\u0000\u0000\uA1C0\uE2F0\u0000\u0000\u0000\u0000\u0000\u0000" + // 20880 - 20889
"\uFABB\uE9C7\uE6AA\u0000\u0000\u0000\u0000\u0000\u0000\uA9CD" + // 20890 - 20899
"\uA9CE\uA9CF\uA9D0\uEDBC\u0000\u0000\uD8D4\u0000\u0000\u0000" + // 20900 - 20909
"\uDCDA\uE9FD\uD0CA\u0000\uF5D6\uD9C5\uE4B4\u0000\uEDA7\uF5AC" + // 20910 - 20919
"\u0000\u0000\u0000\u0000\u0000\uE4F5\u0000\uDCE4\u0000\uE5EF" + // 20920 - 20929
"\u0000\u0000\u0000\u0000\u0000\uDEF8\uF8E9\uE3DE\u0000\uA8AA" + // 20930 - 20939
"\u0000\u0000\u0000\u0000\u0000\uA8AD\uA9AC\u9CAD\uF3ED\u0000" + // 20940 - 20949
"\u0000\u0000\u0000\u0000\u0000\uA9F9\u0000\u0000\u0000\uDCB1" + // 20950 - 20959
"\u0000\u0000\u0000\uD5D6\u0000\uFAEF\uE3E1\u0000\u0000\u0000" + // 20960 - 20969
"\u0000\u0000\u0000\uF5A6\u0000\u0000\uE8C6\u0000\u0000\u0000" + // 20970 - 20979
"\u0000\u0000\u0000\uD5B5\u0000\u0000\uCAAA\uE1F9\u0000\uEAB1" + // 20980 - 20989
"\u0000\u0000\u0000\uEAD6\uF1B0\u0000\u0000\u0000\uE2EE\u0000" + // 20990 - 20999
"\u0000\u0000\u0000\uE5E7\u0000\u0000\u0000\uCAA3\uDDB2\u0000" + // 21000 - 21009
"\u0000\u0000\u0000\uE6A9\u0000\uEFF3\uFDE9\u0000\uCFC1\u0000" + // 21010 - 21019
"\uE0DF\uDEEC\u0000\u0000\uEDB8\u0000\u0000\u0000\uDBB6\u0000" + // 21020 - 21029
"\u0000\uE6F0\u9AB6\u0000\u0000\u0000\u0000\u0000\uB4FD\uB4FE" + // 21030 - 21039
"\u0000\uB5A1\uD7FC\u0000\uEDBB\u0000\u0000\uF6AB\u0000\u0000" + // 21040 - 21049
"\uE0B5\u0000\u0000\u0000\u0000\u0000\u0000\uDEFA\u0000\uD7F8" + // 21050 - 21059
"\uD5C4\u9CD4\u0000\u0000\u0000\u0000\u0000\uEDF4\uD4EB\u0000" + // 21060 - 21069
"\uDEA2\u0000\u0000\u0000\uE5E6\u0000\uF3A7\u0000\u0000\uCDEA" + // 21070 - 21079
"\u0000\uEBEE\u0000\u0000\uD8B4\u0000\u0000\u0000\u0000\u0000" + // 21080 - 21089
"\u0000\uE9E4\u0000\u0000\uD7A5\u0000\u0000\u0000\u0000\uF7E8" + // 21090 - 21099
"\u0000\uA8A2\u0000\u0000\u0000\u0000\u0000\u0000\uA1BF\uF8B3" + // 21100 - 21109
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uEDB6\uCEEF\u0000" + // 21110 - 21119
"\u0000\uF2F3\u0000\u0000\u0000\u0000\uF4EF\u0000\u0000\u0000" + // 21120 - 21129
"\uF6CE\uCCAE\u0000\uDADB\u0000\u0000\u0000\u0000\uCDC7\uDBB9" + // 21130 - 21139
"\u0000\u9AF4\u0000\u0000\u0000\u0000\u0000\uB6F7\uB6F8\u0000" + // 21140 - 21149
"\uB6F9\uEDF3\uDCD9\uE0CD\u0000\u0000\u0000\u0000\uF7DA\uE9A6" + // 21150 - 21159
"\uCBF2\u0000\u0000\u0000\u0000\u0000\u0000\uC7A8\u0000\uC7A9" + // 21160 - 21169
"\uDDAF\uDDB0\u0000\u9BEA\uCBB7\uE8D3\u0000\u0000\uDDF8\u0000" + // 21170 - 21179
"\u9AE4\u0000\u0000\u0000\uE8CF\uE8D2\u0000\uCAC5\uCCEB\u0000" + // 21180 - 21189
"\u0000\u0000\u0000\uE5A6\u0000\u0000\u0000\u0000\uC0EB\uC0EC" + // 21190 - 21199
"\u0000\uC0ED\uD8E6\u9BBD\uF4B1\u0000\u0000\u0000\u0000\u0000" + // 21200 - 21209
"\uB6F3\uB6F4\u0000\u0000\uD1B3\u0000\u0000\u0000\u0000\u0000" + // 21210 - 21219
"\uEFED\uFDD8\u0000\u0000\u0000\u0000\uD2F6\u0000\u0000\uCFBB" + // 21220 - 21229
"\u0000\u0000\u0000\uD3AD\uE8E1\uCEEC\u9DBC\u0000\u9AE8\uF9FD" + // 21230 - 21239
"\u0000\uCADC\u0000\u0000\uE2B2\u0000\uD4BD\u0000\u9BE8\uD9CE" + // 21240 - 21249
"\u0000\uF6B6\u0000\uCEC2\uD6C7\u0000\uE3B4\u0000\uF1AD\uF5C6" + // 21250 - 21259
"\u0000\uE1A2\uE9C6\u0000\u0000\u0000\uF2C5\uDEBD\u0000\uF6A9" + // 21260 - 21269
"\u0000\u0000\u0000\uDAA4\u0000\uDBD8\u0000\u0000\uCAA2\u0000" + // 21270 - 21279
"\u0000\uD1CD\u0000\uA2AC\uA9F6\uA8AC\u0000\uA8F9\uA8F6\uA8FA" + // 21280 - 21289
"\uA2AF\uE9FC\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uD9EE" + // 21290 - 21299
"\uD2B1\u0000\u0000\u0000\u9CF7\uCCE9\u0000\uD9C4\uE9A5\uD6D5" + // 21300 - 21309
"\u0000\uCDC5\u9BBF\uEDBA\uD1BD\u0000\uF1A5\uE9CE\u0000\u0000" + // 21310 - 21319
"\u0000\uF9BC\u0000\u0000\uDECF\u0000\u0000\u0000\u0000\u0000" + // 21320 - 21329
"\u0000\uF8CC\u0000\uEAD9\uF9D7\u0000\u0000\u9CDB\u0000\u0000" + // 21330 - 21339
"\u0000\u0000\uEEEC\u0000\u0000\uD3A3\uEEB7\uF6A8\uDDFD\u0000" + // 21340 - 21349
"\u0000\u0000\u0000\u9DAA\u0000\uF8CF\u0000\u0000\u0000\u0000" + // 21350 - 21359
"\uEAC8\uEEB8\uF1AC\uD7E8\uCBD8\u0000\u0000\u0000\uE9E2\u0000" + // 21360 - 21369
"\u0000\uD4FD\u0000\u0000\uE0C8\u0000\u0000\u0000\u9FE0\uBDBF" + // 21370 - 21379
"\uBDC0\u0000\uBDC1\uE0CC\uEBF9\u0000\u0000\u0000\u0000\u0000" + // 21380 - 21389
"\u9AAE\u9CCF\u0000\uD6BE\u0000\u0000\u0000\uE2BA\u0000\uE3DF" + // 21390 - 21399
"\u0000\uDEC3\u0000\uDEC4\uCAA1\u0000\u0000\uECF5\uE8EE\u0000" + // 21400 - 21409
"\uCBA9\uF1AF\u0000\u0000\uEACE\u0000\uE8DF\u0000\u0000\u0000" + // 21410 - 21419
"\u0000\uC2D5\u0000\u0000\u0000\uE7C5\u9DA2\u0000\uE0E9\u0000" + // 21420 - 21429
"\uA1C6\uA1BE\uA9F7\uA9F8\uA2A5\u0000\uA2D2\u0000\uC8D5\u0000" + // 21430 - 21439
"\u0000\u0000\u0000\u0000\u0000\uFCF5\u0000\u0000\u0000\uE0E6" + // 21440 - 21449
"\u0000\u0000\u0000\u0000\u0000\u0000\uF4D8\uD6B3\uDDAD\uD1BC" + // 21450 - 21459
"\u0000\uE5CF\u0000\uCBB6\u0000\uDAB8\u0000\uDBE9\uFDCC\u0000" + // 21460 - 21469
"\u0000\u0000\u0000\u0000\u0000\uD0A9\u0000\u0000\uEDAB\u0000" + // 21470 - 21479
"\uE3B7\u0000\u0000\u0000\u0000\uC2CD\uC2CE\u0000\uC2CF\uDBEB" + // 21480 - 21489
"\u0000\uDFFE\u0000\u0000\uD8E1\u0000\uF7F3\u9BDB\u0000\u0000" + // 21490 - 21499
"\u0000\u0000\u0000\u0000\u0000\uEBC9\uCEB8\u0000\u0000\u0000" + // 21500 - 21509
"\uD8D2\uF9D6\u0000\u0000\uE1C4\u0000\u0000\u0000\u0000\u0000" + // 21510 - 21519
"\uE8B0\uF9FC\u0000\uCCC0\u0000\u0000\u0000\u0000\u0000\uB6D8" + // 21520 - 21529
"\u0000\u0000\u0000\uA2C6\u0000\u0000\u0000\u0000\u0000\uF0B9" + // 21530 - 21539
"\uE4FE\uE4C9\u0000\uE4E6\u0000\uF1EA\u0000\u0000\u0000\uCBEC" + // 21540 - 21549
"\uCBC0\uF3C5\u0000\u0000\uD4C0\uD5BF\u0000\u0000\u0000\uA1D2" + // 21550 - 21559
"\u0000\u0000\u0000\u0000\u0000\u9DF0\u9CC6\u0000\u0000\uF8DE" + // 21560 - 21569
"\uF9AA\uCAF7\u0000\uEDB7\u0000\u0000\uEFE8\u0000\u0000\uE1BF" + // 21570 - 21579
"\u0000\u0000\u0000\u9CED\uD0A1\u0000\u0000\u0000\uCEF7\u0000" + // 21580 - 21589
"\u0000\uE0D8\u0000\uDCF5\uE0B9\u0000\u0000\u0000\uD4CE\u9CF4" + // 21590 - 21599
"\uF4B5\uF0DB\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uE7BD" + // 21600 - 21609
"\uF8BA\uE8D0\u0000\u0000\uD8FB\u0000\u0000\uEAD5\uF4F3\uDAC9" + // 21610 - 21619
"\u0000\uE6DE\u0000\u0000\u9CBB\u0000\uE4A7\uECD2\u0000\u0000" + // 21620 - 21629
"\uF6B1\u0000\u9BDA\uCEFB\uF9E5\u0000\uE0CA\u0000\u0000\uF2FD" + // 21630 - 21639
"\uD3B0\u0000\uFAFB\u0000\u0000\uFABD\uCCC8\uEFCD\uD5D5\u0000" + // 21640 - 21649
"\uA1A7\u0000\uA8A3\u0000\u0081\u0000\u0000\u0000\uD1A8\u0000" + // 21650 - 21659
"\u0000\u0000\u0000\uC5E1\u0000\u0000\u0000\uD8C8\u0000\u0000" + // 21660 - 21669
"\uEEC1\u0000\uC8CB\u0000\u0000\u0000\u0000\u0000\u0000\uFBE0" + // 21670 - 21679
"\uF2E5\u0000\u0000\uC6FE\u0000\u0000\u0000\u0000\u0000\u0000" + // 21680 - 21689
"\uEFFB\u0000\u0000\uFAF9\uD7C6\u0000\uD1BB\uF7AA\u0000\uEDCA" + // 21690 - 21699
"\uD7D3\uD8FA\uD6E0\u0000\uF1C6\u0000\u0000\u0000\u0000\u0000" + // 21700 - 21709
"\uB6CD\u0000\u0000\u0000\uA1D6\u0000\u0000\u0000\u0000\u0000" + // 21710 - 21719
"\uFCA8\u0000\u0000\uECE6\uEBD6\u0000\uECDF\u0000\u0000\u0000" + // 21720 - 21729
"\uDFFC\u0000\uD0E6\u0000\u0000\uDEC1\u0000\u0000\uE4AC\u0000" + // 21730 - 21739
"\u0078\u0079\u007A\u007B\u007C\u007D\u007E\u007F\uCCBF\u0000" + // 21740 - 21749
"\u0000\u0000\u0000\u0000\u0000\u0000\uFDC8\uE1AC\u0000\u0000" + // 21750 - 21759
"\uE3EB\u0000\uEEC7\u0000\u0000\uE2DB\u0000\u0000\u0000\uDFDE" + // 21760 - 21769
"\u0000\uE0C7\uE1C8\uDBB7\uDFE3\u0000\u0000\u0000\u0000\u0000" + // 21770 - 21779
"\u9EF6\u0000\u0000\u0000\uA2A1\u0000\uA2A2\u0000\u0000\u0000" + // 21780 - 21789
"\uD7FA\u0000\u0000\u0000\uFBC8\uCEDC\uF2B5\uD0E4\uDDD1\u0000" + // 21790 - 21799
"\u0000\u0000\u0000\uA8FB\uA8FC\uA8FD\uA8FE\u0000\uEAA7\uE9F6" + // 21800 - 21809
"\uFBBB\u0000\uE7E9\uEFCC\u0000\u0000\uD9D8\u0000\u0000\u0000" + // 21810 - 21819
"\u0000\u0000\u0000\uD8D5\u0000\u0000\uD8D9\u0000\uF4A3\u0000" + // 21820 - 21829
"\u0000\uF4DD\u0000\u0070\u0071\u0072\u0073\u0074\u0075\u0076" + // 21830 - 21839
"\u0077\uD2EF\u0000\u0000\u0000\uE2ED\u0000\u0000\uDEE9\uFCBC" + // 21840 - 21849
"\u0000\uDAA2\uDAA3\u0000\uD2A1\u0000\u0000\uF2D4\u0000\uD1B0" + // 21850 - 21859
"\u0000\uCCE0\u0000\uDBFD\uD1BA\u0000\uF1C4\u0000\uE5B3\uFBF5" + // 21860 - 21869
"\uE9E1\uFDE0\uCBB3\u0000\u0000\u0000\u0000\u0000\u0000\uD5DD" + // 21870 - 21879
"\uEFC4\u0000\u0000\u0000\u0000\u0000\u0000\uE1D8\uD6EB\u0000" + // 21880 - 21889
"\u0000\u0000\uF4D9\u9CCE\u0000\u0000\uD2C5\uFBD1\uE7C0\uEBA5" + // 21890 - 21899
"\u0000\uDFFA\uE3A2\u9DC6\u0000\u0000\u0000\u0000\u0000\u0000" + // 21900 - 21909
"\uF0EA\uE1C6\u0000\u0000\u0000\uD4BF\u0000\u9BE9\u0000\uE5F8" + // 21910 - 21919
"\u0000\u0000\uDEC0\uECA3\u0000\uE9CD\u0000\u0068\u0069\u006A" + // 21920 - 21929
"\u006B\u006C\u006D\u006E\u006F\uEFBD\uFCD6\u0000\u0000\uDBF4" + // 21930 - 21939
"\u0000\uEFAA\uF8B9\uEEC6\u0000\u0000\u0000\u0000\u0000\u0000" + // 21940 - 21949
"\u0000\uF4F2\uD0B5\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + // 21950 - 21959
"\uE9C0\uCECC\uF5E8\uF7D5\u0000\uD3CD\u0000\uF3FE\u0000\uE3AB" + // 21960 - 21969
"\uEBE0\u0000\u0000\u0000\uCEFA\uCBF7\uE5A5\uD8A2\u0000\u0000" + // 21970 - 21979
"\u0000\u0000\u9BF6\uDDAC\u0000\uFCAF\uD3A1\u0000\uF1AB\u0000" + // 21980 - 21989
"\u0000\u0000\u0000\uC0B8\uC0B9\u0000\u0000\uE3F7\u0000\u0000" + // 21990 - 21999
"\u0000\u0000\u0000\uECA8\u9AD2\u0000\u9DB5\u0000\u0000\u0000" + // 22000 - 22009
"\u0000\uFBEE\uEDF1\u0000\u0000\uF1E2\u0000\uD4DB\u0000\u0000" + // 22010 - 22019
"\uFBA8\uD0A8\u0000\u0000\uDAEC\u0000\u0000\uE7B8\u0000\u0000" + // 22020 - 22029
"\u0000\u0000\u0000\u0000\u9AC1\u9BFB\u0000\u9BD8\u0000\uCDFA" + // 22030 - 22039
"\u0000\u0000\u0000\u0000\u0000\uF8FD\u0000\u0000\uF8FC\u9DB4" + // 22040 - 22049
"\u0000\uEFBC\uD8A1\u0000\u0000\u0000\u0000\uC8DE\uC8DF\u0000" + // 22050 - 22059
"\u0000\uCDF5\u0000\u0000\u0000\uFDB0\uD5A8\u0000\uCEF8\uDCB0" + // 22060 - 22069
"\u0000\u0000\u0000\u0000\uE3AA\u0000\u0060\u0061\u0062\u0063" + // 22070 - 22079
"\u0064\u0065\u0066\u0067\uCFD7\u0000\u0000\u0000\u0000\u0000" + // 22080 - 22089
"\u0000\uCFDF\uE9A1\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + // 22090 - 22099
"\uDFB6\uE5CD\u0000\u0000\u0000\uFAEB\u0000\uCFBC\u0000\uEDDB" + // 22100 - 22109
"\uDFB2\uDFBE\uF9BB\u0000\uDCF4\u0000\u0000\uF4B8\uF7BC\uDCFD" + // 22110 - 22119
"\u0000\uE8EC\uE4E7\u0000\u0058\u0059\u005A\u005B\\\u005D" + // 22120 - 22129 // Modified to map U-005C to 0x5C
"\u005E\u005F\uCDDA\u0000\u0000\u0000\u0000\u0000\uD9CF\u0000" + // 22130 - 22139
"\uECE9\uEFCB\u0000\uF6D2\u0000\u0000\u0000\uD8B2\uF0D6\u0000" + // 22140 - 22149
"\u0000\u0000\u0000\u0000\u0000\u0000\uE4F3\uCAD9\u0000\u0000" + // 22150 - 22159
"\uEFEF\u0000\uF5AA\u0000\u0000\uE8CC\u0000\u0000\u0000\uDEB7" + // 22160 - 22169
"\u0000\u0000\uCBC9\u0000\u9BAF\uE6D1\uF0CC\u0000\u0000\uDAC5" + // 22170 - 22179
"\u0000\uD8EC\u0000\u0000\u0000\u0000\uC5DB\uC5DC\u0000\uC5DD" + // 22180 - 22189
"\uFDFC\u0000\u0000\u0000\u0000\uE1AA\u0000\u0000\uE8AC\u0000" + // 22190 - 22199
"\uE8DD\u0000\u0000\uEFE9\u0000\uA2E4\u0000\u0000\uA7E4\uA7EE" + // 22200 - 22209
"\uA7E9\u0000\u0000\uF9C9\u0000\uE4E2\u0000\uFBBD\u0000\u0000" + // 22210 - 22219
"\uECEC\uFBBE\uDFEB\u0000\uE1F8\u0000\u0000\uE2D4\uD2FD\u0000" + // 22220 - 22229
"\uE5A8\u0000\u0000\u0000\u9DCF\u0000\u0000\u0000\u0000\uA1A4" + // 22230 - 22239
"\u0000\u0000\u0000\u0000\uC0AB\uC0AC\u0000\uC0AD\uDDFA\u0000" + // 22240 - 22249
"\u0000\u0000\u0000\u0000\u0000\uF0D5\uE2B3\uDEE7\u0000\u0000" + // 22250 - 22259
"\u0000\u0000\u0000\u0000\uB7D8\u0000\u0000\uEEC3\u0000\u0000" + // 22260 - 22269
"\u0000\u0000\u0000\u0000\uCEF6\u0000\uFAD0\uF8F9\u0000\u0000" + // 22270 - 22279
"\u0000\u0000\uF0AE\u0000\u0000\u9CA8\u0000\uFDB8\uE3E8\u0000" + // 22280 - 22289
"\uD4A7\uE8FC\uDEE6\u0000\u0000\u0000\u0000\uDFD4\u0000\u0000" + // 22290 - 22299
"\uE7A7\u0000\uE6D7\u0000\u0000\u0000\u0000\uC6CA\uC6CB\u0000" + // 22300 - 22309
"\uC6CC\uE9DE\u0000\u0000\u0000\u0000\u0000\uF0D3\uF2B4\uD1B7" + // 22310 - 22319
"\uF2B3\u0000\u0000\u0000\u0000\u0000\u0000\uB0EB\u0000\uB0EC" + // 22320 - 22329
"\uDEE5\uD1B5\u0000\u0000\u0000\u0000\u0000\uD1B6\uD8A8\u0000" + // 22330 - 22339
"\u0000\u0000\uCCE4\u0000\u0000\uD1B4\uDAF1\u0000\u0000\u0000" + // 22340 - 22349
"\u0000\u0000\u0000\u0000\uE6A2\uCAF9\u0000\u0000\uD4DA\u0000" + // 22350 - 22359
"\u0000\u0000\u0000\uC7F0\uC7F1\u0000\uC7F2\u9CDA\u0000\u0000" + // 22360 - 22369
"\uF4E2\u0000\u0000\u0000\u0000\uA0F7\u0000\u0000\u0000\u9FF1" + // 22370 - 22379
"\uBEAD\u0000\u0000\u0000\u9FF2\u9FF3\u0000\u0000\u0000\uBECE" + // 22380 - 22389
"\uBECF\uBED0\u0000\uBED1\uF3B7\u0000\u0000\u0000\u0000\u0000" + // 22390 - 22399
"\u0000\u0000\uDBFC\uD9C2\u0000\uF0D2\u0000\uE4D1\u0000\u0000" + // 22400 - 22409
"\u0000\u9FE7\u0000\uBDE0\u0000\u0000\uE9FB\uEAA8\u0000\u0000" + // 22410 - 22419
"\u0000\u0000\uFDB7\uD8F9\u0000\u0000\u0000\u0000\u9CF5\u0000" + // 22420 - 22429
"\u0000\uE6D5\u0000\u0000\uE9F2\u0000\uDFB0\u0000\uA7EA\u0000" + // 22430 - 22439
"\u0000\uA7EB\u0000\u0000\uA7DF\u0000\u0050\u0051\u0052\u0053" + // 22440 - 22449
"\u0054\u0055\u0056\u0057\uF7AF\uDAB6\u0000\uCAD7\u0000\u0000" + // 22450 - 22459
"\u0000\u0000\uC7CB\uC7CC\u0000\uC7CD\uDFD3\u0000\u0000\u0000" + // 22460 - 22469
"\uDAF0\u0000\uE2EA\u0000\uA7BC\uA7ED\uA7B5\u0000\u0000\u0000" + // 22470 - 22479
"\u0000\uA7B9\uE7C3\u0000\uECCC\u0000\u0000\u0000\u0000\u0000" + // 22480 - 22489
"\uB5E5\uB5E6\u0000\u0000\uD9ED\u0000\u0000\u0000\u0000\uF5A5" + // 22490 - 22499
"\u0000\uA7DA\uA7DB\uA2E3\uA7EC\uA7A6\uA7E0\uA7EF\uA2E1\uCDC1" + // 22500 - 22509
"\u0000\u0000\uFBD3\u0000\u0000\u0000\u0000\uC7C7\uC7C8\u0000" + // 22510 - 22519
"\u0000\uDBCC\uDDCD\u0000\u0000\u0000\uD4C8\u0000\uA7C7\uA7C8" + // 22520 - 22529
"\uA7CE\uA7CF\uA7D0\uA7D1\uA7D2\uA7D3\uCDA4\u0000\u0000\uD4F4" + // 22530 - 22539
"\uDBA1\uDBDC\uDBDD\u0000\uA7BF\uA7C0\uA7C1\uA7C2\uA7C3\uA7C4" + // 22540 - 22549
"\uA7C5\uA7C6\uE8B9\u0000\uEFA6\u0000\u0000\u0000\u0000\u0000" + // 22550 - 22559
"\u9EED\uB5DD\u0000\uB5DE\u9AF3\u0000\u0000\u0000\u0000\u0000" + // 22560 - 22569
"\u0000\u0000\uD9A7\uF4B0\uF3EA\uDAEE\u0000\uD7BB\u0000\uE2B1" + // 22570 - 22579
"\u9DF4\uE5DC\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uCDD9" + // 22580 - 22589
"\uD3C3\u0000\uD8A6\u9BB3\uF6C1\u0000\u0000\u0000\uB6D5\uB6D6" + // 22590 - 22599
"\u0000\u0000\u0000\uB8DD\uB8DE\uB8DF\u0000\u0000\uF8B2\u0000" + // 22600 - 22609
"\u0000\u0000\uDCEB\u0000\u0000\uFBC7\uD5C8\u0000\uD7DF\u0000" + // 22610 - 22619
"\uDDA9\u0000\uA7BE\uA7E5\uA7E6\uA7E7\uA7E8\uA7E1\uA7E2\uA7E3" + // 22620 - 22629
"\uD4E3\uCCE2\u0000\uF7D4\u0000\u0000\u0000\u0000\uC7B6\u0000" + // 22630 - 22639
"\u0000\u0000\uB6BB\uB6BC\uB6BD\u0000\u0000\uCCDE\u0000\u0000" + // 22640 - 22649
"\u0000\u0000\u0000\u0000\uDCE0\u0000\u0000\uEFBA\uF1DD\u0000" + // 22650 - 22659
"\uDEB3\u0000\u0000\u0000\u9AE1\u0000\u0000\uF4C7\u0000\uA7B2" + // 22660 - 22669
"\uA7B3\uA7B4\uA7A7\uA7A8\uA7A9\uA7AA\uA7BD\uD3B8\uF2D6\u0000" + // 22670 - 22679
"\u0000\uD4D9\uEEC5\uF2F0\u0000\uA7A5\uA7AB\uA7AC\uA7AD\uA7AE" + // 22680 - 22689
"\uA7AF\uA7B0\uA7B1\uD1B1\u0000\uCBB1\u0000\u0000\u0000\u0000" + // 22690 - 22699
"\uD1B2\uECB6\u0000\u0000\u0000\u0000\uFBFE\uD3D7\u0000\uA7D4" + // 22700 - 22709
"\uA7D5\uA7D6\uA7D7\uA7D8\uA7A1\uA7A2\uA7A3\uEFA4\u0000\uEFEB" + // 22710 - 22719
"\u0000\u0000\u0000\u0000\u0000\uB5D6\u0000\u0000\u0000\u9EDD" + // 22720 - 22729
"\uB4B3\u0000\u0000\u0000\uB4E2\uB4E3\uB4E4\u0000\uB4E5\uEFA3" + // 22730 - 22739
"\uEBA6\uCBA3\uE3E9\u0000\u0000\u0000\uD1FB\uE9C4\u0000\u0000" + // 22740 - 22749
"\uDCCB\uE9C5\u0000\u0000\u0000\uB3D6\uB3D7\uB3D8\u0000\u0000" + // 22750 - 22759
"\uE5C8\u0000\u0000\u0000\uFBA4\uD4B9\u0000\uA7BA\uA7BB\uA7DC" + // 22760 - 22769
"\uA7DD\uA7DE\uA7B6\uA7B7\uA7B8\uCAF6\u0000\uE4A4\uF4D6\u0000" + // 22770 - 22779
"\u0000\u0000\uDFE6\uFBD2\u0000\uF8F8\uF7FB\u0000\u0000\uE8BF" + // 22780 - 22789
"\u0000\uA7C9\uA7CA\uA7CB\uA7CC\uA7CD\u0000\u0000\u0000\uFAAE" + // 22790 - 22799
"\u0000\u0000\u0000\uD6E9\uCEB6\u0000\uF3C0\u0000\uCDFE\u0000" + // 22800 - 22809
"\u0000\u0000\u9EB7\uB1C9\uB1CA\u0000\u0000\uFBCD\u0000\uD5BD" + // 22810 - 22819
"\uF1DF\u0000\u0000\uF6FB\uFCBB\u0000\uE2B0\u0000\u0000\uE6A5" + // 22820 - 22829
"\u0000\u0000\uD3C2\u0000\u0000\u0000\u0000\uD3B6\u0000\uA8C9" + // 22830 - 22839
"\uA8CA\uA8CB\uA8CC\u0000\u0000\u0000\uA2DE\uF3BF\u0000\uF0D1" + // 22840 - 22849
"\u0000\u0000\u0000\u0000\u0000\uB5CD\u0000\u0000\u0000\uB1BF" + // 22850 - 22859
"\uB1C0\uB1C1\u0000\uB1C2\uD7F3\u0000\u0000\u0000\uFCD4\u0000" + // 22860 - 22869
"\uDAD7\uCCDF\uF2D3\uFBA9\uD8A5\u0000\u0000\u0000\u0000\uD5CB"
;
public Encoder(Charset cs) {
super(cs, index2a);
IBM949.initc2b();
c2b = Arrays.copyOf(IBM949.c2b, IBM949.c2b.length);
c2bIndex = Arrays.copyOf(IBM949.c2bIndex, IBM949.c2bIndex.length);
for (char c = '\0'; c < '\u0080'; ++c) {
int index = c2bIndex[c >> 8];
c2b[index + (c & 0xff)] = c;
}
}
}

@ -22,7 +22,7 @@
*/
/* @test
@bug 5066863 5066867 5066874 5066879 5066884 5066887
@bug 5066863 5066867 5066874 5066879 5066884 5066887 5065777
@summary canEncode() false iff encode() throws CharacterCodingException
@run main/timeout=1200 FindCanEncodeBugs
@author Martin Buchholz
@ -53,9 +53,8 @@ public class FindCanEncodeBugs {
Charset cs = e.getValue();
if (! cs.canEncode() ||
csn.matches("x-COMPOUND_TEXT") ||
csn.matches("x-ISO-2022-CN-CNS") || // ISO2022_CN_CNS supports less
csn.matches("(x-)?IBM(970).*")) // Broken as of 2004-07
csn.matches("x-COMPOUND_TEXT") ||
csn.matches("x-ISO-2022-CN-CNS")) // ISO2022_CN_CNS supports less
continue;
//System.out.println(csn);

@ -38,11 +38,6 @@ public class FindEncoderBugs {
static boolean isBroken(String csn) {
if (csn.equals("x-COMPOUND_TEXT")) return true;
if (csn.equals("x-IBM834")) return true; // stateful korean
if (csn.equals("x-IBM933")) return true; // stateful korean
if (csn.equals("x-IBM970")) return true; // stateful korean
if (csn.equals("x-IBM949")) return true; // stateful korean
if (csn.equals("x-IBM949C")) return true; // stateful korean
return false;
}

@ -32,7 +32,6 @@
*
*/
package sun.nio.cs.ext;
public class DBCSDecoderMapping {

@ -26,7 +26,6 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;

@ -26,7 +26,6 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;

@ -26,7 +26,6 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;

@ -26,7 +26,6 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;

@ -23,7 +23,6 @@
* have any questions.
*/
package sun.nio.cs.ext;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;

@ -27,21 +27,21 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.*;
public class IBM1381
public class IBM1381_OLD
extends Charset
implements HistoricallyNamedCharset
{
public IBM1381() {
super("x-IBM1381", ExtendedCharsets.aliasesFor("x-IBM1381"));
public IBM1381_OLD() {
super("x-IBM1381-Old", null);
}
public String historicalName() {

@ -26,21 +26,22 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.*;
public class IBM1383
public class IBM1383_OLD
extends Charset
implements HistoricallyNamedCharset
{
public IBM1383() {
super("x-IBM1383", ExtendedCharsets.aliasesFor("x-IBM1383"));
public IBM1383_OLD() {
super("x-IBM1383-Old", null);
}
public String historicalName() {

@ -27,19 +27,20 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.*;
public class IBM930 extends Charset implements HistoricallyNamedCharset
public class IBM930_OLD extends Charset implements HistoricallyNamedCharset
{
public IBM930() {
super("x-IBM930", ExtendedCharsets.aliasesFor("x-IBM930"));
public IBM930_OLD() {
super("x-IBM930_Old", null);
}
public String historicalName() {

@ -23,8 +23,6 @@
* have any questions.
*/
package sun.nio.cs.ext;
import java.nio.CharBuffer;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
@ -33,14 +31,16 @@ import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.Surrogate;
import sun.nio.cs.ext.*;
public class IBM933
public class IBM933_OLD
extends Charset
implements HistoricallyNamedCharset
{
public IBM933() {
super("x-IBM933", ExtendedCharsets.aliasesFor("x-IBM933"));
public IBM933_OLD() {
super("x-IBM933_Old", null);
}
public String historicalName() {

@ -27,19 +27,20 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.*;
public class IBM935 extends Charset implements HistoricallyNamedCharset
public class IBM935_OLD extends Charset implements HistoricallyNamedCharset
{
public IBM935() {
super("x-IBM935", ExtendedCharsets.aliasesFor("x-IBM935"));
public IBM935_OLD() {
super("x-IBM935_Old", null);
}
public String historicalName() {

@ -27,19 +27,20 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.*;
public class IBM937 extends Charset implements HistoricallyNamedCharset
public class IBM937_OLD extends Charset implements HistoricallyNamedCharset
{
public IBM937() {
super("x-IBM937", ExtendedCharsets.aliasesFor("x-IBM937"));
public IBM937_OLD() {
super("x-IBM937-Old", null);
}
public String historicalName() {

@ -27,21 +27,21 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.*;
public class IBM939
public class IBM939_OLD
extends Charset
implements HistoricallyNamedCharset
{
public IBM939() {
super("x-IBM939", ExtendedCharsets.aliasesFor("x-IBM939"));
public IBM939_OLD() {
super("x-IBM939_Old", null);
}
public String historicalName() {

@ -0,0 +1,104 @@
/*
* Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/*
*/
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
public class IBM942C_OLD extends Charset implements HistoricallyNamedCharset
{
public IBM942C_OLD() {
super("x-IBM942C_OLD", null);
}
public String historicalName() {
return "Cp942C";
}
public boolean contains(Charset cs) {
return ((cs.name().equals("US-ASCII"))
|| (cs instanceof IBM942C_OLD));
}
public CharsetDecoder newDecoder() {
return new Decoder(this);
}
public CharsetEncoder newEncoder() {
return new Encoder(this);
}
private static class Decoder extends IBM942_OLD.Decoder {
protected static final String singleByteToChar;
static {
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
singleByteToChar = indexs +
IBM942_OLD.Decoder.singleByteToChar.substring(indexs.length());
}
public Decoder(Charset cs) {
super(cs, singleByteToChar);
}
}
private static class Encoder extends IBM942_OLD.Encoder {
protected static final short index1[];
protected static final String index2a;
protected static final int shift = 5;
static {
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
index2a = IBM942_OLD.Encoder.index2a + indexs;
int o = IBM942_OLD.Encoder.index2a.length() + 15000;
index1 = new short[IBM942_OLD.Encoder.index1.length];
System.arraycopy(IBM942_OLD.Encoder.index1,
0,
index1,
0,
IBM942_OLD.Encoder.index1.length);
for (int i = 0; i * (1<<shift) < 128; ++i) {
index1[i] = (short)(o + i * (1<<shift));
}
}
public Encoder(Charset cs) {
super(cs, index1, index2a);
}
}
}

@ -26,19 +26,20 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.*;
public class IBM942 extends Charset implements HistoricallyNamedCharset
public class IBM942_OLD extends Charset implements HistoricallyNamedCharset
{
public IBM942() {
super("x-IBM942", ExtendedCharsets.aliasesFor("x-IBM942"));
public IBM942_OLD() {
super("x-IBM942-Old", null);
}
public String historicalName() {

@ -0,0 +1,103 @@
/*
* Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/*
*/
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
public class IBM943C_OLD extends Charset implements HistoricallyNamedCharset
{
public IBM943C_OLD() {
super("x-IBM943C_OLD", null);
}
public String historicalName() {
return "Cp943_OLDC";
}
public boolean contains(Charset cs) {
return ((cs.name().equals("US-ASCII"))
|| (cs instanceof IBM943C_OLD));
}
public CharsetDecoder newDecoder() {
return new Decoder(this);
}
public CharsetEncoder newEncoder() {
return new Encoder(this);
}
private static class Decoder extends IBM943_OLD.Decoder {
protected static final String singleByteToChar;
static {
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
singleByteToChar = indexs +
IBM943_OLD.Decoder.singleByteToChar.substring(indexs.length());
}
public Decoder(Charset cs) {
super(cs, singleByteToChar);
}
}
private static class Encoder extends IBM943_OLD.Encoder {
protected static final short index1[];
protected static final String index2a;
protected static final int shift = 6;
static {
String indexs = "";
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
index2a = IBM943_OLD.Encoder.index2a + indexs;
int o = IBM943_OLD.Encoder.index2a.length() + 15000;
index1 = new short[IBM943_OLD.Encoder.index1.length];
System.arraycopy(IBM943_OLD.Encoder.index1,
0,
index1,
0,
IBM943_OLD.Encoder.index1.length);
for (int i = 0; i * (1<<shift) < 128; ++i) {
index1[i] = (short)(o + i * (1<<shift));
}
}
public Encoder(Charset cs) {
super(cs, index1, index2a);
}
}
}

@ -26,19 +26,19 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.*;
public class IBM943 extends Charset implements HistoricallyNamedCharset
public class IBM943_OLD extends Charset implements HistoricallyNamedCharset
{
public IBM943() {
super("x-IBM943", ExtendedCharsets.aliasesFor("x-IBM943"));
public IBM943_OLD() {
super("x-IBM943-Old", null);
}
public String historicalName() {

@ -26,19 +26,20 @@
/*
*/
package sun.nio.cs.ext;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.*;
public class IBM948 extends Charset implements HistoricallyNamedCharset
public class IBM948_OLD extends Charset implements HistoricallyNamedCharset
{
public IBM948() {
super("x-IBM948", ExtendedCharsets.aliasesFor("x-IBM948"));
public IBM948_OLD() {
super("x-IBM948-Old", null);
}
public String historicalName() {

Some files were not shown because too many files have changed in this diff Show More